|
16 | 16 | description: "Which style command to run (options: 'default' (make style && make quality), 'quality_only', 'style_only')" |
17 | 17 | default: "default" |
18 | 18 | pr_number: |
19 | | - required: false |
| 19 | + required: true |
20 | 20 | type: number |
21 | | - description: "Pull Request number to process (only used when running manually)" |
| 21 | + description: "Pull Request number to process" |
22 | 22 | python_quality_dependencies: |
23 | 23 | required: true |
24 | 24 | type: string |
@@ -74,13 +74,13 @@ jobs: |
74 | 74 | - name: Extract PR details |
75 | 75 | id: pr_info |
76 | 76 | uses: actions/github-script@v6 |
| 77 | + env: |
| 78 | + PR_NUMBER: ${{ inputs.pr_number }} |
77 | 79 | with: |
78 | 80 | script: | |
79 | | - const prNumber = context.eventName === 'workflow_dispatch' |
80 | | - ? context.payload.inputs.pr_number |
81 | | - : context.payload.issue.number; |
| 81 | + const prNumber = process.env.PR_NUMBER; |
| 82 | + console.log(`PR number from env: "${prNumber}"`); |
82 | 83 | |
83 | | - // Get PR details |
84 | 84 | const { data: pr } = await github.rest.pulls.get({ |
85 | 85 | owner: context.repo.owner, |
86 | 86 | repo: context.repo.repo, |
@@ -125,11 +125,11 @@ jobs: |
125 | 125 |
|
126 | 126 | - name: Verify critical files haven't been modified |
127 | 127 | uses: actions/github-script@v6 |
| 128 | + env: |
| 129 | + PR_NUMBER: ${{ inputs.pr_number }} |
128 | 130 | with: |
129 | 131 | script: | |
130 | | - const prNumber = context.eventName === 'workflow_dispatch' |
131 | | - ? context.payload.inputs.pr_number |
132 | | - : context.payload.issue.number; |
| 132 | + const prNumber = process.env.PR_NUMBER; |
133 | 133 | const { data: pr } = await github.rest.pulls.listFiles({ |
134 | 134 | owner: context.repo.owner, |
135 | 135 | repo: context.repo.repo, |
|
0 commit comments