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

feature request: Check on the PR title #244

Closed
NotSoImportant opened this issue Oct 22, 2020 · 3 comments · Fixed by #256
Closed

feature request: Check on the PR title #244

NotSoImportant opened this issue Oct 22, 2020 · 3 comments · Fixed by #256
Labels
enhancement New feature or request

Comments

@NotSoImportant
Copy link

Have an approval and denial rule that checks the PR title against a regex.

Like this you can enforce only PRs with valid commit messages can be merged (e.g. https://www.conventionalcommits.org/en/v1.0.0/#summary)

Github hooks already trigger on renaming a PR.

@bluekeyes bluekeyes added the enhancement New feature or request label Oct 23, 2020
@gberger
Copy link

gberger commented Dec 9, 2020

+1 this would help in avoiding contributors leaving the default PR title "Update filename.txt"

derekjobst added a commit that referenced this issue Jan 14, 2021
This PR includes changes which add functionality for disapproving pull requests which do not comply by defined title formatting requirements as mentioned in #244.

- A new predicate `title` is added for defining allowed (`not_match`) and disallowed (`match`) regex patterns on a pull request title.
- The `disapproval` policy is extended to allow predicates just as individual `approval_rules` do. However, whereas an approval rule may only allow approvals subject to passing predicates, the `disapproval` policy will only allow disapprovals subject to its own predicates all failing. Passing predicates on the `disapproval` policy will trigger a default disapproval, just as failing predicates on an approval rule will implicitly approve (pass).
@derekjobst derekjobst linked a pull request Jan 14, 2021 that will close this issue
@NotSoImportant
Copy link
Author

Thank you :-)
Is this included in latest version 1.21.0?
I cannot find release notes.

@asvoboda
Copy link
Member

Hey @NotSoImportant,

The changelog/release notes are listed in the Github release: https://github.com/palantir/policy-bot/releases/tag/v1.21.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants