Skip to content

Commit 477b32f

Browse files
PlaneshifterShabiShett07
authored andcommitted
build: fix event payload access
--- 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: na - task: lint_typescript_declarations status: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed --- --- type: pre_push_report description: Results of running various checks prior to pushing changes. report: - task: run_javascript_examples status: na - task: run_c_examples status: na - task: run_cpp_examples status: na - task: run_javascript_readme_examples status: passed - task: run_c_benchmarks status: na - task: run_cpp_benchmarks status: na - task: run_fortran_benchmarks status: na - task: run_javascript_benchmarks status: na - task: run_julia_benchmarks status: na - task: run_python_benchmarks status: na - task: run_r_benchmarks status: na - task: run_javascript_tests status: na ---
1 parent 9a0f8f4 commit 477b32f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

.github/workflows/slash_commands.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,15 +63,15 @@ jobs:
6363
with:
6464
github-token: ${{ secrets.STDLIB_BOT_PAT_REPO_WRITE }}
6565
script: |
66-
const commentBody = github.event.comment.body.trim();
66+
const commentBody = context.payload.comment.body.trim();
6767
const RE_COMMANDS = /^\/stdlib\s+(help|check-files|update-copyright-years|lint-autofix|merge|rebase)$/i;
6868
const isRecognizedCommand = RE_COMMANDS.test( commentBody );
6969
7070
if ( isRecognizedCommand ) {
7171
await github.rest.reactions.createForIssueComment({
7272
'owner': context.repo.owner,
7373
'repo': context.repo.repo,
74-
'comment_id': github.event.comment.id,
74+
'comment_id': context.payload.comment.id,
7575
'content': 'eyes'
7676
});
7777
} else {
@@ -83,7 +83,7 @@ jobs:
8383
'owner': context.repo.owner,
8484
'repo': context.repo.repo,
8585
'issue_number': github.event.issue.number,
86-
'body': `${quote}\n\n@${github.event.comment.user.login}, slash command not recognized. Please use \`/stdlib help\` to view available commands.`
86+
'body': `${quote}\n\n@${context.payload.comment.user.login}, slash command not recognized. Please use \`/stdlib help\` to view available commands.`
8787
});
8888
}
8989

0 commit comments

Comments
 (0)