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

Improve enforcement of linear commit history #1266

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

klutchell
Copy link
Collaborator

Use the GitHub API to check commit parents in BASE and HEAD branches and ensure we are following a linear history.

HEAD should not have any merge commits, so reject any HEAD branches where one or more commits have multiple parents.

The tip of BASE should be a merge commit that includes the tip of HEAD, otherwise the workflow should reject.

Change-type: minor

Use the GitHub API to check commit parents in BASE and HEAD
branches and ensure we are following a linear history.

HEAD should not have any merge commits, so reject any HEAD branches
where one or more commits have multiple parents.

The tip of BASE should be a merge commit that includes the
tip of HEAD, otherwise the workflow should reject.

Change-type: minor
Signed-off-by: Kyle Harding <[email protected]>
Signed-off-by: Kyle Harding <[email protected]>
Copy link
Contributor

flowzone-app bot commented Nov 18, 2024

Website deployed to CF Pages, 👀 preview link https://55e135e6.flowzone.pages.dev

Comment on lines +1193 to +1194
- *getHeadBranchMergeCommits
- *rejectNonLinearHead
Copy link
Contributor

Choose a reason for hiding this comment

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

These seem like they must be run together and in order so I'm wondering why they aren't a single anchor since they are so 1-1 dependent?

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

Successfully merging this pull request may close these issues.

2 participants