Repository navigation
Conversation
|
The following comment was made by an LLM, it may be inaccurate: |
|
Independent confirmation, and the runtime artifact you said was not available locally. A Four other PRs opened in the last two days are in the same state, each with a plain One more detail that may be worth putting in the description: re-running the check does not clear the label once it is applied. Editing #50184's body at 05:38Z today re-triggered |
|
Thanks for the independent confirmation - the One precision: the For the already-labelled PRs: once this lands on |
Issue for this PR
Fixes #51970
Type of change
What does this PR do?
pr-standardslabels every PR that targets a non-default base withneeds:issue, even when the description contains a validCloses #123/Fixes #123.It reads
closingIssuesReferences, which GitHub only populates for PRs targeting the default branch, so av2-targeted PR always reads0. Thev2copy ofpr-standards.ymlalready falls back to matching closing keywords in the description, butpull_request_targetruns the workflow from the default branch, so thedevcopy is the one that executes - and it has no fallback.This ports that fallback from
v2todev, so the running workflow stops flagging non-default-base PRs that do reference an issue. The change is exactly the block already merged onv2.Runtime evidence
Confirmed from the
check-standardsjob log on #50184 (run 36527091671,pull_request_target): the script it actually ran has nohasBodyIssueRefat all - it goes straight fromclosingIssuesReferences.totalCounttoif (linkedIssues === 0). That is thedevcopy, so thev2fallback is dead in practice rather than just in theory.The asymmetry is visible on live PRs:
v2-targeted #51890, #51910, #51935 and #51986 each contain a plainCloses #N, each readclosingIssuesReferences.totalCount === 0, and each carryneeds:issue;dev-targeted #51989, #51979 and #51911 each read 1. Re-running the check by editing the body does not clear the label once applied (#50184 edited at 05:38Z: the job succeeded andneeds:compliancewas dropped in the same pass, butneeds:issuestayed).How did you verify your code works?
git diffof the added block matches thev2version character-for-character (git diff upstream/dev upstream/v2 -- .github/workflows/pr-standards.yml).actions/github-script. The condition is: withlinkedIssues === 0, accept/(closes|fixes|resolves)\s+#\d+/i(or any#\d+) inside the### Issue for this PRsection of the body.Screenshots / recordings
Not applicable; no UI change.
Checklist