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

Automate the commit checks and move the checklist to CONTRIBUTING.md #110

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 1 addition & 13 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,13 +1 @@
<!-- short summary -->

What I did:


## Checklist

* [ ] all commits are `--signoff` (Why? See CONTRIBUTING.md)
* [ ] No `!fixup` commits in the PR
* [ ] I ran `cargo check --all --tests`
* [ ] I ran `cargo test`
* [ ] I ran `cargo clippy`

<!-- Please read CONTRIBUTING.md first and consider the checklist -->
10 changes: 8 additions & 2 deletions .github/workflows/commit-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ name: Pull Request Checks
jobs:
commit-lint:
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'

steps:
- uses: actions/checkout@v3
with:
Expand All @@ -15,4 +15,10 @@ jobs:
with:
python-version: '3.x'
- run: pip install gitlint
- run: gitlint --commits $(git merge-base origin/master HEAD)..HEAD
- run: |
gitlint \
-c general.ignore-fixup-commits=false \
-c general.ignore-fixup-amend-commits=false \
-c general.ignore-squash-commits=false \
--contrib contrib-body-requires-signed-off-by,contrib-disallow-cleanup-commits \
--commits "$(git merge-base origin/master HEAD)..HEAD"
Comment on lines +19 to +24
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd rather put a .gitlint file in the repository than using CLI flags, so contributors can run gitlint locally!

Copy link
Member Author

Choose a reason for hiding this comment

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

Nice to use gitlint, especially since I contributed that check to gitlint

Haha, nice xD

I'd rather put a .gitlint file in the repository than using CLI flags, so contributors can run gitlint locally!

Yes, I'd also prefer that. If you don't mind, I'd do it in a separate PR though (together with some other gitlint changes/improvements that I didn't include here). This PR already got bigger than expected and I didn't want to squeeze everything into that large commit (and I was also too lazy to repeat all of my tests for it tbh).

Copy link
Contributor

Choose a reason for hiding this comment

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

Bigger than expected with one commit? Hahah you clearly haven't seen my 800+ commit PRs yet.

But sure, go ahead! I'm not the maintainer here, so I have nothing to say anyways! 😆

Copy link
Collaborator

Choose a reason for hiding this comment

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

@matthiasbeyer You know that's not true and your opinion matters here :)
@primeos-work Thanks for the PR
bors merge

12 changes: 0 additions & 12 deletions .github/workflows/fixupblock.yml

This file was deleted.

10 changes: 10 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@

This file describes how you can contribute to butido.

## Checklist

Those checks are performed/enforced via CI but you probably want to go over the
checklist before submitting a PR to avoid unnecessary PR/CI iteration cycles:

* [ ] All commits are signed off (`--signoff` - Why? See below)
* [ ] No `!fixup` (etc.) commits
* [ ] I ran `cargo check --all --tests`
* [ ] I ran `cargo test`
* [ ] I ran `cargo clippy`

## Reporting issues / Questions

Expand Down