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

Add fixup check to gh actions #774

Merged
merged 2 commits into from
Oct 8, 2024
Merged

Conversation

mbrandenburger
Copy link
Contributor

@mbrandenburger mbrandenburger commented Oct 1, 2024

This PR introduces another github action to check if a PR contains fixup commits. The check does not prevent us from merging but highlights the needs of squashing before merging a PR.

I've created a test PR that contains this commit and an empty fixup commit. As shown in #775, the gh action indicates that there is a fixup commit.

Signed-off-by: Marcus Brandenburger <[email protected]>
@mbrandenburger mbrandenburger marked this pull request as ready for review October 1, 2024 12:25
@mbrandenburger mbrandenburger requested a review from a team as a code owner October 1, 2024 12:25
@mbrandenburger mbrandenburger self-assigned this Oct 1, 2024
@mbrandenburger mbrandenburger added the enhancement New feature or request label Oct 1, 2024
@munapower
Copy link
Contributor

I was reading the documentation for the github action that is added. So for small PRs it is ok, but for larger PRs, like the recent one where we upgraded the samples ... it suggests a process. Maybe we should reference that somewhere so our collaborators are aware?

@mbrandenburger
Copy link
Contributor Author

mbrandenburger commented Oct 7, 2024

Thanks @munapower

The "squash and merge" option will always help to get rid of the fixup commits eventually. As you pointed out correctly, for larger PRs, where a "squash and merge" seems wrong, a process is required. We actually describe this process for FPC here.
The following git command rebases a branch and squashes all fixup commits in into their corresponding commit:

git rebase --autosquash main

@mbrandenburger mbrandenburger merged commit 2b8ae26 into hyperledger:main Oct 8, 2024
3 checks passed
@mbrandenburger mbrandenburger mentioned this pull request Oct 8, 2024
osamamagdy pushed a commit to osamamagdy/fabric-private-chaincode that referenced this pull request Oct 11, 2024
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 this pull request may close these issues.

2 participants