Repository navigation
Description
Severity
severity: low
Reproducibility
reproducible: always
Regression
regression: yes
Affects latest release
latest-release: no
User story
As a contributor opening a pull request from a fork, I want PR Body Check to tell me what I can actually do, so that I am not asked to fix a failure that only a maintainer can fix.
Script name
n/a (CI only)
Game
n/a (CI only)
Linux distro
Other
Command
n/a (CI only: .github/workflows/action-pr-body-check.yml)
Expected behavior
When the author of a pull request has no write access, the body says Fixes #N and #N is not linked in Development, the check says that a maintainer links the issue and re-runs the check, and that nothing needs to change in the pull request.
Actual behavior
Since #5139, the check fails with the same instruction for every author:
Not linked in Development: #5179. Closing keywords in pull requests to develop do not link issues. Select each issue in the Development section of this pull request's sidebar, then re-run this check.
A contributor from a fork can do neither step:
- GitHub's docs say "Anyone with write permissions to a repository can manually link a pull request to an issue from the pull request sidebar" (Linking a pull request to an issue). There is no API for it either.
- Re-running a workflow also needs write access.
The pull request template asks for Fixes #[issue], so every pull request from a fork that follows the template gets this failure. #5180 is the first one since #5139 (run 42375999136). Recent pull requests from forks include #5087, #5088, #5108, #5109, #5111, #5115 and #5119, so it will come up regularly.
Further information
Pull requests by maintainers are not affected: they can link the issue and re-run the check, as #5139 intended.
The failure is still useful on pull requests from forks, because the maintainer who merges them is the one who has to link the issue, and missed links are what #5139 was added for. So the proposed fix keeps the failure and only changes the message, based on the pull request's author_association:
OWNER,MEMBERandCOLLABORATOR: the current message.- Everyone else: "Linking an issue there needs write access to this repository, so a maintainer links it and re-runs this check before merging. Nothing needs to change in this pull request."
To unblock #5180 now, a maintainer needs to link #5179 in its Development section and re-run PR Body Check.
Pre-checks
- I ran update and validate before reporting this issue. (Not applicable: CI only.)
Relevant log output
##[error]Not linked in Development: #5179. Closing keywords in pull requests to develop do not link issues. Select each issue in the Development section of this pull request's sidebar, then re-run this check.Steps to reproduce
- From a fork, open a pull request into
developwhose body follows the template and saysFixes #Nfor an open issue. - PR Body Check fails with "Not linked in Development: #N ... Select each issue in the Development section of this pull request's sidebar, then re-run this check."
- Without write access, the author cannot link the issue or re-run the check, so the failure stays until a maintainer acts.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fields✅ Done
Activity
fix(ci): clarify maintainer action for missing issue links (#5184)