File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -47,15 +47,20 @@ jobs:
4747 id : automation
4848 working-directory : tools/sep-automation
4949 run : |
50- if [[ "${{ github.event.inputs.dry_run }} " == "true" ]]; then
50+ if [[ "$DRY_RUN " == "true" ]]; then
5151 echo "::notice::Running in DRY RUN mode - no changes will be made"
5252 else
5353 echo "::warning::Running in PRODUCTION mode - changes will be applied!"
5454 fi
5555
56- if [[ -n "${{ github.event.inputs.issue_number }}" ]]; then
57- echo "Processing single issue #${{ github.event.inputs.issue_number }}"
58- npm start -- --issue ${{ github.event.inputs.issue_number }} 2>&1 | tee automation.log
56+ if [[ -n "$ISSUE_NUMBER" ]]; then
57+ if ! [[ "$ISSUE_NUMBER" =~ ^[1-9][0-9]*$ ]]; then
58+ echo "::error::Issue/PR number must be a positive integer"
59+ exit 1
60+ fi
61+
62+ echo "Processing single issue #$ISSUE_NUMBER"
63+ npm start -- --issue "$ISSUE_NUMBER" 2>&1 | tee automation.log
5964 else
6065 echo "Running full sweep"
6166 npm start 2>&1 | tee automation.log
6873 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
6974 MAINTAINERS_TEAM : core-maintainers
7075 DRY_RUN : ${{ github.event.inputs.dry_run }}
76+ ISSUE_NUMBER : ${{ github.event.inputs.issue_number }}
7177 DISCORD_WEBHOOK_URL : ${{ secrets.DISCORD_WEBHOOK_URL }}
7278 LOG_LEVEL : info
7379
You can’t perform that action at this time.
0 commit comments