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

Stop enforcing conventional commits in pull-requests #302

Merged
merged 1 commit into from
Sep 2, 2024
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
17 changes: 17 additions & 0 deletions .github/workflows/check-commits.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Check Commits

on: [workflow_call]

jobs:
build:
name: Check commits
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- uses: huggingface/[email protected]
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
max-commits: "10"
min-words: "3"
forbidden-words: "fixup"
15 changes: 0 additions & 15 deletions .github/workflows/conventional-commits.yml

This file was deleted.

12 changes: 6 additions & 6 deletions .github/workflows/linux-cpu-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ on:
- "pyproject.toml"

jobs:
conventional-commits:
uses: ./.github/workflows/conventional-commits.yml
check-commits:
uses: ./.github/workflows/check-commits.yml
python-quality:
uses: ./.github/workflows/python-quality.yml
test-ubuntu-cpu:
needs: [conventional-commits, python-quality]
needs: [check-commits, python-quality]
runs-on: ubuntu-latest
strategy:
fail-fast: false
Expand Down Expand Up @@ -56,7 +56,7 @@ jobs:
python -m pytest test/cli

run_staging_tests:
needs: [conventional-commits, python-quality]
needs: [check-commits, python-quality]
runs-on: ubuntu-latest
strategy:
fail-fast: false
Expand All @@ -69,7 +69,7 @@ jobs:
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Build and install quanto
run: |
pip install --upgrade pip
Expand All @@ -78,4 +78,4 @@ jobs:
- name: Run models hub tests
run: |
pip install accelerate transformers diffusers
HUGGINGFACE_CO_STAGING=true python -m pytest test/models -k "hub"
HUGGINGFACE_CO_STAGING=true python -m pytest test/models -k "hub"
6 changes: 3 additions & 3 deletions .github/workflows/linux-cuda-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ on:
- "pyproject.toml"

jobs:
conventional-commits:
uses: ./.github/workflows/conventional-commits.yml
check-commits:
uses: ./.github/workflows/check-commits.yml
python-quality:
uses: ./.github/workflows/python-quality.yml
test-ubuntu-cuda:
needs: [conventional-commits, python-quality]
needs: [check-commits, python-quality]
runs-on: [self-hosted, single-gpu , nvidia-gpu, a10, ci]
strategy:
fail-fast: false
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/linux-examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ on:
- "pyproject.toml"

jobs:
conventional-commits:
uses: ./.github/workflows/conventional-commits.yml
check-commits:
uses: ./.github/workflows/check-commits.yml
python-quality:
uses: ./.github/workflows/python-quality.yml
run-examples:
needs: [conventional-commits, python-quality]
needs: [check-commits, python-quality]
runs-on: [self-hosted, single-gpu , nvidia-gpu, a10, ci]
strategy:
fail-fast: false
Expand Down
26 changes: 9 additions & 17 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,24 +151,16 @@ You'll need **Python 3.8** or above to contribute. Follow the steps below to sta
git commit
```

We kindly request you to use [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/#summary)
to clearly communicate the changes you made (here the full [specification](https://www.conventionalcommits.org/en/v1.0.0/))!
This repository uses a `rebase` strategy when merging pull-requests, meaning that your commits will **not** be squashed automatically.

This article gives a brief [rationale](https://julien.ponge.org/blog/the-power-of-conventional-commits/) of why this will make our life and yours easier.
We therefore request you to keep a tidy queue of commits in your pull-request, clearly communicating the changes you made in each commit.

**This is enforced by the continuous integration, so your pull-request will not be reviewed if your commit queue is not clean.**

The following commit types are allowed:
- feat,
- fix,
- docs,
- style,
- refactor,
- test,
- build,
- perf,
- ci,
- chore,
- revert,
- review.
Although this is not mandatory, we kindly ask you to consider using [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/#summary)
(here the full [specification](https://www.conventionalcommits.org/en/v1.0.0/))!

This article gives a brief [rationale](https://julien.ponge.org/blog/the-power-of-conventional-commits/) of why this will make our life and yours easier.

To keep your copy of the code up to date with the original
repository, rebase your branch on `upstream/branch` *before* you open a pull request or if requested by a maintainer:
Expand All @@ -178,7 +170,7 @@ You'll need **Python 3.8** or above to contribute. Follow the steps below to sta
git rebase upstream/main
```

Also, consider editing your commit history to make it more readable for the reviewer (like squashing temporary commits).
Before submitting, cleanup your commit history to make it more readable for the reviewer (like squashing temporary commits and editing commit messages to clearly explain what you changed).

Push your changes to your branch:

Expand Down