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

GH Actions: add merge-conflict check #391

Merged
merged 1 commit into from
Dec 24, 2024

Conversation

jrfnl
Copy link
Contributor

@jrfnl jrfnl commented Dec 23, 2024

Context

  • Improve dev experience

Summary

This PR can be summarized in the following changelog entry:

  • Improve dev experience

Relevant technical choices:

This commit adds a new workflow which runs on pushes (merges) to any of the long-running branches and whenever the contents of a pull requests changes.

It will check whether any open PRs are in a "conflict state" (after the push) and if so, will add a "merge conflict" label and leave a comment on the PR asking the OP to solve the conflict. The workflow will automatically remove the label again when the conflict is resolved.

This workflow uses a reusable action stored in the .github repository which takes care of the default settings, though a number of settings can still be overruled for an individual repo.

For now, it has not been deemed necessary to overrule these though.

Test instructions

Test instructions for the acceptance test before the PR gets merged

This PR can be acceptance tested by following these steps:

  • This PR cannot be tested until it has been merged (as the workflow will only run on pushes to select branches).

This means some tweaks may be needed after the merge. However, the principle of the workflow has been tested and used in other repos (like PHPCS) for a while, so I don't expect any issues.

Only real question is how well this will work with a reusable workflow, so consider this PR the test for all repos. There is a PR open with a merge conflict. If the label + comment appear once this workflow is merged, we should be good (and yes, I will check this).

This commit adds a new workflow which runs on pushes (merges) to any of the long-running branches and whenever the contents of a pull requests changes.

It will check whether any open PRs are in a "conflict state" (after the push) and if so, will add a "merge conflict" label and leave a comment on the PR asking the OP to solve the conflict.
The workflow will automatically remove the label again when the conflict is resolved.

This workflow uses a reusable action stored in the `.github` repository which takes care of the default settings, though a number of settings can still be overruled for an individual repo.

For now, it has not been deemed necessary to overrule these though.
@coveralls
Copy link

Pull Request Test Coverage Report for Build 12469959949

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 50.122%

Totals Coverage Status
Change from base Build 12315264685: 0.0%
Covered Lines: 1236
Relevant Lines: 2466

💛 - Coveralls

@jrfnl jrfnl merged commit 6f7af74 into trunk Dec 24, 2024
23 checks passed
@jrfnl jrfnl deleted the JRF/ghactions-add-merge-conflict-check branch December 24, 2024 00:46
@jrfnl
Copy link
Contributor Author

jrfnl commented Dec 24, 2024

Confirmed working as expected (and as intended): see #44 for an example.

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

Successfully merging this pull request may close these issues.

2 participants