@@ -126,6 +126,7 @@ jobs:
126
126
BUCKET_PREFIX :" gs://coder-traiage-outputs/traiage"
127
127
CONTEXT_KEY :${{ steps.extract-context.outputs.context_key }}
128
128
GITHUB_TOKEN :${{ github.token }}
129
+ GITHUB_REPOSITORY :${{ github.repository }}
129
130
ISSUE_URL :${{ inputs.issue_url }}
130
131
WORKSPACE_NAME :${{ steps.create-workspace.outputs.workspace_name }}
131
132
run :|
@@ -149,19 +150,12 @@ jobs:
149
150
echo ''
150
151
} >> "${SUMMARY_FILE}"
151
152
152
- ./scripts/traiage.sh summary >> "${SUMMARY_FILE}"
153
- SUMMARY=$(<"${SUMMARY_FILE}")
154
- echo "${SUMMARY}" >> "${GITHUB_STEP_SUMMARY}"
155
- echo "summary=${SUMMARY}" >> "${GITHUB_OUTPUT}"
156
-
157
- -name :Comment on Issue (only for coder/coder)
158
- id :comment-issue
159
- if :${{ startsWith(github.event.inputs.issue_url, format('https://github.com/{0}/', github.repository)) }}
160
- env :
161
- ISSUE_URL :${{ inputs.issue_url }}
162
- SUMMARY :${{ steps.generate-summary.outputs.summary }}
163
- run :|
164
- gh issue comment "${ISSUE_URL}" --body-file "${SUMMARY}" --create-if-none --edit-last
153
+ if [[ "${ISSUE_URL}" == "${GITHUB_REPOSITORY}"* ]]; then
154
+ gh issue comment "${ISSUE_URL}" --body-file "${SUMMARY_FILE}" --create-if-none --edit-last
155
+ else
156
+ echo "Skipping comment on other repo."
157
+ fi
158
+ cat < "${SUMMARY_FILE}" >> "${GITHUB_STEP_SUMMARY}"
165
159
166
160
-name :Cleanup workspace
167
161
if :steps.create-workspace.outputs.workspace_name != '' && steps.create-archive.outputs.archive_url != ''