Skip to content

Fix GH-25391: Automatically link PRs to issues - #25507

Draft
kairosci wants to merge 5 commits into
php:masterfrom
kairosci:fix/gh-25391-link-pr-issue
Draft

kairosci wants to merge 5 commits into
php:masterfrom
kairosci:fix/gh-25391-link-pr-issue

Conversation

@kairosci

@kairosci kairosci commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Add Fixes #N to descriptions of PRs titled Fix GH-N.

Fixes #25391

@kairosci

Copy link
Copy Markdown
Contributor Author

cc @LamentXU123

@kairosci
kairosci force-pushed the fix/gh-25391-link-pr-issue branch 2 times, most recently from bc08df3 to e0ac60b Compare November 16, 2026 23:46
@kairosci
kairosci force-pushed the fix/gh-25391-link-pr-issue branch from e0ac60b to 58288c8 Compare November 16, 2026 23:47

@iluuu1994 iluuu1994 left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This action doesn't really make sense to me.

CI requires every commit in a PR titled Fix GH-XXXXX to include Fixes #XXXXX in its message body, so the reference survives cherry-picks.

This is not true. GitHub will look for (Fix|Fixes|Close|Closes) (#|GH-)[0-9]+ in the PR description. It will, however, not look for it in the title. Adding it just to the commits isn't enough either. (For linking the issue to the PR, that is. It will close the issue once the commit lands in the default branch.)

When I spoke to @LamentXU123 I mentioned the possibility of pinging @edorian to see if GitHub might be willing to fix this, rather than everyone having to implement a workaround. I don't think this happened at this point?

@kairosci kairosci closed this Nov 17, 2026
@kairosci kairosci changed the title Fix GH-25391: Automatically link PRs to issues [wontfix] Fix GH-25391: Automatically link PRs to issues Nov 17, 2026
@kairosci
kairosci deleted the fix/gh-25391-link-pr-issue branch November 17, 2026 22:03
@kairosci
kairosci restored the fix/gh-25391-link-pr-issue branch November 25, 2026 18:52
@kairosci kairosci reopened this Nov 25, 2026
@kairosci kairosci changed the title [wontfix] Fix GH-25391: Automatically link PRs to issues Fix GH-25391: Automatically link PRs to issues Nov 25, 2026
@kairosci
kairosci marked this pull request as draft November 25, 2026 18:54
Add the closing reference to the pull request description, where GitHub detects it, instead of requiring it in every commit.

Fixes php#25391
@iluuu1994

iluuu1994 commented Nov 26, 2026 •

Copy link
Copy Markdown
Member

Then we might as well link the PR in the "Development" field. Closes/Fixes doesn't link the PR if it doesn't target the master branch. But your code is still too specific, this should work whether Close/Closes/Fix/Fixes or #/GH- is used.

@kairosci
kairosci force-pushed the fix/gh-25391-link-pr-issue branch from 9103647 to 1cc43a9 Compare November 26, 2026 23:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Github bot to automatically relate PRs and issues with Fix GH-XXXXX in the title

2 participants