Skip to content

Conversation

@burgerdev
Copy link
Member

@burgerdev burgerdev commented Oct 8, 2025

In addition to the do-not-merge label, this prevents merging commits that start their subject with one of the following phrases:

  • DO NOT MERGE
  • DNM
  • draft

Example failure: https://github.com/edgelesssys/contrast/actions/runs/18350842068/job/52270109970?pr=1830

@burgerdev burgerdev added the no changelog PRs not listed in the release notes label Oct 8, 2025
In addition to the do-not-merge label, this prevents merging commits
that start their subject with one of the following phrases:

* `DO NOT MERGE`
* `DNM`
* `draft`
@burgerdev burgerdev force-pushed the burgerdev/dnm-check branch from 72cdb9d to 9392b09 Compare October 8, 2025 16:06
@burgerdev burgerdev marked this pull request as ready for review October 9, 2025 06:20
Copy link
Contributor

Choose a reason for hiding this comment

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

should probably be renamed to prevent_accidental_merge.yml or similar

BASE_SHA: ${{ github.event.pull_request.base.sha }}
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
run: |
if ! git log --pretty=format:"%s" "${BASE_SHA}..${HEAD_SHA}" | grep -E "^(DNM|DO NOT MERGE|draft)"; then
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
if ! git log --pretty=format:"%s" "${BASE_SHA}..${HEAD_SHA}" | grep -E "^(DNM|DO NOT MERGE|draft)"; then
if ! git log --pretty=format:"%s" "${BASE_SHA}..${HEAD_SHA}" | grep -iE "^(dnm|do not merge|draft|temp)"; then

(i flag for robustness, temp for... personal reasons, feel free to ignore 😆)

@katexochen
Copy link
Member

In addition to the do-not-merge label, this prevents merging commits that start their subject with one of the following phrases:

Did that happen before?

  • DO NOT MERGE
  • DNM
  • draft

usually such labels would at least go into [ ], I would add [no ci]. But to be honest, I think we could spend hours finding things people mark the wip commits with, and I don't see a lot of value here.

@burgerdev
Copy link
Member Author

In addition to the do-not-merge label, this prevents merging commits that start their subject with one of the following phrases:

Did that happen before?

I use DO NOT MERGE as a prefix, and I saw others use that, too. Whenever I see it in review, I feel the need to comment "make sure to drop this", but I'd rather have a robot think of it.

  • DO NOT MERGE
  • DNM
  • draft

usually such labels would at least go into [ ], I would add [no ci]. But to be honest, I think we could spend hours finding things people mark the wip commits with, and I don't see a lot of value here.

I can relax the regex a bit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no changelog PRs not listed in the release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants