Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Close linked issues when a PR is merged #777

Open
xmo-odoo opened this issue Jun 16, 2023 · 1 comment
Open

Close linked issues when a PR is merged #777

xmo-odoo opened this issue Jun 16, 2023 · 1 comment
Labels

Comments

@xmo-odoo
Copy link
Collaborator

Github has features which close a linked issue when a PR is merged (possibly just to the main branch): special tags in commits (closes, fixes, ...) or manually linked issues (to test how this behaves).

In the context of the mergebot, and odoo's workflow, this is a problem:

  1. the commit tags only work from the main branch, as Odoo PRs are mostly not merged in the main branch a lot of fixes will never land there
  2. linked issues might only work off of the main branch and / or merging the PR (to test, but at least one of them fails as currently the feature doesn't work), which is impossible for external tools to do if they need to do any modification (rebase, rewrites, ...) unless they can and want smash that back in the PR itself, Explicit "mark as merged" option in pull request UI isaacs/github#2 https://github.com/orgs/community/discussions/12437 https://github.com/orgs/community/discussions/24641

Apparently it's possible to retrieve linked PRs but only in the v4 API via PullRequest.closingIssuesReferences. Though at least that looks pre-filtered by applicable issues (aka only those this PR will close). This means on merging a PR we could retrieve this list and close all the linked issues. A bit of a pain because GQL but it'd be done via a cron anyway (as we'd need to be sure the PR was successfully merged before even checking) so should be feasible via an ad-hoc GQL query.

@xmo-odoo xmo-odoo modified the milestone: saas-13.2 Jun 16, 2023
@xmo-odoo
Copy link
Collaborator Author

xmo-odoo commented Jun 4, 2024

Pulling back because I want to do it, but

  • it's hardly urgent (more of a nice to have to compensate for a few gh deficiencies)
  • it requires a fair amount of research on how gh populates "issues references"
  • it definitely requires additions to dummy central's currently anemic issues support, and likely adding actual gql support for closingIssuesReferences

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: ideas
Development

No branches or pull requests

1 participant