File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change 69
69
psql --version
70
70
Write-Host "Using .NET SDK: $(dotnet --version)"
71
71
#
72
+
73
+
74
+
75
+ - uses : actions/github-script@v6
76
+ id : get_issue_number
77
+ with :
78
+ script : |
79
+ if (context.issue.number) {
80
+ // Return issue number if present
81
+ echo "Found issue number"
82
+ return context.issue.number;
83
+ } else {
84
+ // Otherwise return issue number from commit
85
+ echo "Fetching..."
86
+ return (
87
+ await github.rest.repos.listPullRequestsAssociatedWithCommit({
88
+ commit_sha: context.sha,
89
+ owner: context.repo.owner,
90
+ repo: context.repo.repo,
91
+ })
92
+ ).data[0].number;
93
+ }
94
+ result-encoding: string
95
+ - name : Print PR/Issue number
96
+ run : echo '${{steps.get_issue_number.outputs.result}}'
97
+
98
+
72
99
- name : Print messages
73
100
shell : pwsh
74
101
env :
You can’t perform that action at this time.
0 commit comments