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

Support optional statuses on PRs #1062

Open
xmo-odoo opened this issue Feb 24, 2025 · 0 comments
Open

Support optional statuses on PRs #1062

xmo-odoo opened this issue Feb 24, 2025 · 0 comments
Labels

Comments

@xmo-odoo
Copy link
Collaborator

Currently the mergebot only has two statuses for statuses (ignoring that statuses can be different between PRs and stagings since 5c1caa1):

  • required, so the mergebot needs to receive the status every time for the PR to progress
  • ignored, so the mergebot doesn't care about the status

However over time we've seen a new need: sub-repo statuses, which are only triggered some time (e.g. based on files touched, team, etc...) but need to block the PR if and when they are failed.

This should be pretty easy to implement: in PullRequests._compute_statuses, the default value for a status state just needs to be provided by the StatusConfiguration object.

@xmo-odoo xmo-odoo moved this to accepted in Mergebot Feb 24, 2025
@xmo-odoo xmo-odoo moved this from accepted to done in Mergebot Feb 25, 2025
xmo-odoo added a commit that referenced this issue Feb 25, 2025
If a status is defined as `optional`, then the PR is considered valid
if the status is never sent, but *if* the status is sent then it
becomes required.

Note that as ever this is a per-commit requirement, so it's mostly
useful for conditional statuses.

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

No branches or pull requests

1 participant