#62817 closed feature request (fixed)
Automatically close pull requests when referenced ticket is fixed
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 6.8 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Build/Test Tools | Keywords: | has-patch |
Focuses: | Cc: |
Description
There are currently over 2,000 open pull requests on GitHub for wordpress-develop. Many of these were likely left open after a fix was merged into SVN.
There should be a GitHub Action that parses commit messages for fixed ticket numbers and searches all open pull requests for references to that ticket in the description. This is documented as a requirement in the handbook for using GitHub for contributing. These tickets should be closed with a comment detailing why it was closed.
Change History (12)
This ticket was mentioned in PR #8139 on WordPress/wordpress-develop by @desrosj.
3 months ago
#1
3 months ago
#2
This is difficult to test, however I've tested pretty extensively in my fork.
#3
@
3 months ago
I've attached a pull request that accomplishes this on push
events.
In the future, this could be expanded to check recently closed tickets on Trac that don't have an associated commit. For example, ones that are closed as wontfix
(props @johnbillion for that idea).
Props should also go to @davidbaumwald for listening to me and giving feedback when I initially played around with this idea 2-3 years ago.
@peterwilsoncc commented on PR #8139:
3 months ago
#4
I think the GitHub link in the comment will need to use the full URL for the trac integration in order to show links.
But let me test to be sure:
Trac reference via r prefix: r59656
Trac prefix linked: r59656
GH Hash only: ab4b4eb55d14feb74d34647c7aa4eb370dbd87a8
GH Link: https://github.com/WordPress/wordpress-develop/commit/ab4b4eb55d14feb74d34647c7aa4eb370dbd87a8
If I am not confused by how the integration works, this should show up as https://core.trac.wordpress.org/ticket/62817#comment:4
@swissspidy commented on PR #8139:
3 months ago
#5
I think the GitHub link in the comment will need to use the full URL for the trac integration in order to show links.
You mean the full link to the commit hash, not just ${{ github.sha }}
?
#7
@
3 months ago
- Owner set to desrosj
- Resolution set to fixed
- Status changed from new to closed
In 59661:
3 months ago
#9
@peterwilsoncc It looks like the comment did not make its way to Trac. I think that is likely due to the fact that we're ignoring comments from the GitHub Actions bot to avoid the playground and other comments from being posted on Trac tickets.
I think this is probably fine, but wanted to make sure there are no strong feelings otherwise.
@johnbillion commented on PR #8139:
3 months ago
#10
I think that's preferable! Saves unnecessary noise on the ticket.
@peterwilsoncc commented on PR #8139:
3 months ago
#12
@desrosj Yes, I'm fine with that too.
This introduces a workflow that finds pull requests referencing any fixed tickets in commit messages.
Trac ticket: https://core.trac.wordpress.org/ticket/62817