Skip to content

Commit d0aaee8

Browse files
committed
fix: error body
--- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: passed - task: lint_typescript_declarations status: passed - task: lint_typescript_tests status: na - task: lint_license_headers status: passed ---
1 parent fd8cfc0 commit d0aaee8

2 files changed

Lines changed: 7 additions & 4 deletions

File tree

.github/workflows/scripts/create_todo_issue/run

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ post_source_comment() {
7373
fi
7474
curl -s -X POST \
7575
-H "Authorization: token ${GITHUB_TOKEN}" \
76-
-H "Accept: application/vnd.github.v3+json" \
76+
-H "Accept: application/vnd.github+json" \
7777
-H "Content-Type: application/json" \
7878
-d "${payload}" \
7979
"${endpoint}" \
@@ -240,7 +240,7 @@ ${bt}${bt}${bt}"
240240
# Verify the commenter is a member of the target organization:
241241
membership_status=$(curl -s -o /dev/null -w "%{http_code}" \
242242
-H "Authorization: token ${GITHUB_TOKEN}" \
243-
-H "Accept: application/vnd.github.v3+json" \
243+
-H "Accept: application/vnd.github+json" \
244244
"${github_api_url}/orgs/${target_owner}/members/${COMMENTER}")
245245

246246
if [ "${membership_status}" != "204" ]; then
@@ -281,7 +281,7 @@ ${provenance}"
281281
issue_response=$(curl -s \
282282
-X POST \
283283
-H "Authorization: token ${GITHUB_TOKEN}" \
284-
-H "Accept: application/vnd.github.v3+json" \
284+
-H "Accept: application/vnd.github+json" \
285285
-H "Content-Type: application/json" \
286286
-d "${issue_payload}" \
287287
"${github_api_url}/repos/${target_owner}/${target_repo}/issues")
@@ -326,4 +326,7 @@ ${provenance}"
326326
exit 0
327327
}
328328

329+
# Set an error handler to capture errors and perform any clean-up tasks:
330+
trap 'on_error $?' ERR
331+
329332
main

.github/workflows/slash_commands.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ jobs:
103103
'owner': context.repo.owner,
104104
'repo': context.repo.repo,
105105
'commit_sha': context.payload.comment.commit_id,
106-
'body': `${quote}\n\n@${context.payload.comment.user.login}, slash command not recognized. Please use \`/stdlib help\` to view available commands.`
106+
'body': `${quote}\n\n@${context.payload.comment.user.login}, slash command not recognized. On commit comments, only \`/stdlib todo\` is supported.`
107107
});
108108
} else {
109109
await github.rest.issues.createComment({

0 commit comments

Comments
 (0)