feat: add gitflow automation and branch protection workflows#5
Merged
feat: add gitflow automation and branch protection workflows#5
Conversation
- advance-main: fast-forwards main to develop after CI passes (workflow_run trigger); preserves identical SHAs on both branches. Requires RepositoryRole admin bypass on the protect-main ruleset. - source-branch-check: blocks PRs to main unless source is develop or hotfix/* - CODEOWNERS: auto-assigns PKramek as reviewer on all PRs - dependabot: weekly github-actions updates grouped into a single PR targeting develop
Automated workflow_run would collapse develop and main into a single effective branch, removing the intentional release-decision gate that justifies the two-branch gitflow model. Manual dispatch preserves that gate: main advances only when explicitly triggered, allowing multiple PRs to accumulate on develop before promotion. Also sets cancel-in-progress=false: manual triggers should never cancel each other mid-flight.
Moves development setup, branching model, pre-commit hooks, and maintainer workflows (advance-main, release, hotfix) into a dedicated CONTRIBUTING.md so GitHub surfaces it as a banner when opening PRs. README contributing section is replaced with a 3-line pointer.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
workflow_dispatch-triggered workflow that fast-forwardsmaintodevelop's HEAD on explicit request. Usesforce=falseto guard against non-fast-forward updates and verifies SHA parity after advance. Identical commit SHAs on both branches are preserved.mainunless the source branch isdeveloporhotfix/*@PKramekas reviewer on all PRsgithub-actionsdependency updates grouped into a single PR targetingdevelopCONTRIBUTING.mdWhat was done outside this PR (GitHub API)
protect-mainruleset: merge method changed torebase,RepositoryRole adminbypass actor added (required for the advance-main automation)protect-developruleset: re-enabled after syncingdeveloptomainHEADprotect-release-tagsruleset created: protectsv*tags from deletion and force-pushdevelopsynced tomainHEADGitflow from here
Test plan
develop, manually trigger Actions → Advance main → Run workflowgit log mainandgit log developare identical after advance