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

github: workflows: compliance: Ensure no merge commits #52639

Merged
merged 1 commit into from
Nov 30, 2022

Conversation

carlescufi
Copy link
Member

@carlescufi carlescufi commented Nov 29, 2022

Add a simple one-liner that checks for "0" in the count of commits with
two or more parents. If a merge commit is present the output will be "1"
or higher, failing the job.

Signed-off-by: Carles Cufi carles.cufi@nordicsemi.no

This is what it looks like:

image

image

gmarull
gmarull previously approved these changes Nov 29, 2022
@carlescufi carlescufi force-pushed the check-merge-commit branch 2 times, most recently from 8b44d4b to f5a38c1 Compare November 29, 2022 15:01
@carlescufi carlescufi requested a review from gmarull November 29, 2022 15:02
stephanosio
stephanosio previously approved these changes Nov 29, 2022
@carlescufi
Copy link
Member Author

@gmarull @stephanosio @fabiobaltieri Currently forcing the failure to see what this looks like. Let me know when you're done looking and I'll remove the merge commit.

@carlescufi
Copy link
Member Author

@gmarull @stephanosio @fabiobaltieri Currently forcing the failure to see what this looks like. Let me know when you're done looking and I'll remove the merge commit.

I have added the screenshots so I will now rebase, remove the merge commit and leave this PR ready for merging.

gmarull
gmarull previously approved these changes Nov 29, 2022
stephanosio
stephanosio previously approved these changes Nov 29, 2022
fabiobaltieri
fabiobaltieri previously approved these changes Nov 29, 2022
Add a simple one-liner that checks for "0" in the count of merge
commits. If a merge commit is present the output will be "1"
or higher, failing the job.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
@carlescufi
Copy link
Member Author

@stephanosio I have had to double the brackets, [[ and ]], otherwise this does not work in zsh.

@nashif nashif merged commit f70eddc into zephyrproject-rtos:main Nov 30, 2022
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.

6 participants