Commit a40fd94
authored
[no-ci] Fix race condition in PR metadata check workflow (#1874)
* Fix race condition in PR metadata check workflow
The workflow reads assignees, labels, and milestone from the event
payload, which is a snapshot taken at trigger time. When a PR is
opened, the `opened` event fires before labels/milestone/assignee
are fully applied, causing the check to fail with stale data.
Fix by fetching live PR data via `gh api` instead of relying on the
event payload. The downstream validation logic is unchanged.
* Use --jq to filter gh api response to only needed fields
Address review feedback: use gh's built-in --jq flag to extract only
assignees, labels, and milestone from the API response, avoiding
unnecessary processing of the full PR payload.
* Use gh pr view instead of gh api for cleaner PR data fetch
Address review feedback: use the higher-level `gh pr view` command
with --json and --jq instead of constructing the raw API URL.1 parent 93f3880 commit a40fd94
1 file changed
+12
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | 28 | | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
40 | 49 | | |
41 | 50 | | |
42 | 51 | | |
| |||
0 commit comments