@@ -94,10 +94,28 @@ jobs:
94
94
fi
95
95
echo "::notice::User ${GITHUB_USERNAME} verified as member of ${GITHUB_ORG} organization"
96
96
97
+ -name :Determine issue URL
98
+ id :determine-issue-url
99
+ env :
100
+ INPUTS_ISSUE_URL :${{ inputs.issue_url }}
101
+ GITHUB_EVENT_ISSUE_HTML_URL :${{ github.event.issue.html_url }}
102
+ GITHUB_EVENT_NAME :${{ github.event_name }}
103
+ run :|
104
+ if [[ "${GITHUB_EVENT_NAME}" == "workflow_dispatch" ]]; then
105
+ echo "issue_url=${INPUTS_ISSUE_URL}" >> "${GITHUB_OUTPUT}"
106
+ exit 0
107
+ elif [[ "${GITHUB_EVENT_NAME}" == "issues" ]]; then
108
+ echo "issue_url=${GITHUB_EVENT_ISSUE_HTML_URL}" >> "${GITHUB_OUTPUT}"
109
+ exit 0
110
+ else
111
+ echo "::error::Unsupported event type: ${GITHUB_EVENT_NAME}"
112
+ exit 1
113
+ fi
114
+
97
115
-name :Extract context key from issue
98
116
id :extract-context
99
117
env :
100
- ISSUE_URL :${{inputs .issue_url }}
118
+ ISSUE_URL :${{steps.determine-issue-url.outputs .issue_url }}
101
119
GH_TOKEN :${{ github.token }}
102
120
run :|
103
121
issue_number="$(gh issue view "${ISSUE_URL}" --json number --jq '.number')"
@@ -151,7 +169,7 @@ jobs:
151
169
CONTEXT_KEY :${{ steps.extract-context.outputs.context_key }}
152
170
GH_TOKEN :${{ github.token }}
153
171
GITHUB_REPOSITORY :${{ github.repository }}
154
- ISSUE_URL :${{inputs .issue_url }}
172
+ ISSUE_URL :${{steps.determine-issue-url.outputs .issue_url }}
155
173
PREFIX :${{ inputs.prefix }}
156
174
RUN_ID :${{ github.run_id }}
157
175
TEMPLATE_PARAMETERS :${{ secrets.TRAIAGE_TEMPLATE_PARAMETERS }}
@@ -207,7 +225,7 @@ jobs:
207
225
CONTEXT_KEY :${{ steps.extract-context.outputs.context_key }}
208
226
GH_TOKEN :${{ github.token }}
209
227
GITHUB_REPOSITORY :${{ github.repository }}
210
- ISSUE_URL :${{inputs .issue_url }}
228
+ ISSUE_URL :${{steps.determine-issue-url.outputs .issue_url }}
211
229
TASK_NAME :${{ steps.create-task.outputs.TASK_NAME }}
212
230
run :|
213
231
SUMMARY_FILE=$(mktemp)