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

chore(ci): add Github labels based on PR title #2914

Merged
merged 9 commits into from
Dec 11, 2024
22 changes: 22 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,25 @@ categories:
- 'test flakiness'
- title: 📦 Dependency updates
label: 'dependencies'
autolabeler:
- label: 'breaking change'
title:
- '/^[a-z]+(\(.+\))?!\:/'
- label: 'security'
title:
- '/^security(\(.+\))?!?\:/'
- label: 'feature'
title:
- '/^feat(\(.+\))?!?\:/'
- label: 'bug'
title:
- '/^(fix)(\(.+\))?!?\:/'
- label: 'documentation'
title:
- '/^docs(\(.+\))?!?\:/'
- label: 'chore'
title:
- '/^chore(\(.+\))?!?\:/'
- label: 'dependencies'
title:
- '/^deps(\(.+\))?!?\:/'
6 changes: 3 additions & 3 deletions .github/workflows/conventions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,14 @@ jobs:
with:
# We may not need a scope on every commit (i.e. repo-level change).
#
# feat!: read config consistenly
# feat(redis): support for clustering
# chore(redis): update tests
# fix(redis): trim connection string
# ^ ^ ^
# | | |__ Subject
# | |_______ Scope
# |____________ Type
# |____________ Type: it can end with a ! to denote a breaking change.
requireScope: false
# Scope should be lowercase.
disallowScopes: |
Expand All @@ -40,10 +41,9 @@ jobs:
didn't match the configured pattern. Please ensure that the subject
doesn't start with an uppercase character.
types: |
break
security
mdelapenya marked this conversation as resolved.
Show resolved Hide resolved
fix
feat
bug
docs
chore
deps
6 changes: 6 additions & 0 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ on:
push:
branches:
- main
# pull_request event is required only for autolabeler
pull_request:
# Only following types are handled by the action, but one can default to all as well
types: [opened, reopened, synchronize]

permissions:
contents: read
Expand All @@ -17,5 +21,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: release-drafter/release-drafter@3f0f87098bd6b5c5b9a36d49c41d998ea58f9348 # v5.19.0
with:
disable-autolabeler: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
9 changes: 8 additions & 1 deletion docs/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,19 @@ Please just be sure to:
* follow the style, naming and structure conventions of the rest of the project.
* make commits atomic and easy to merge.
* use [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/) for the PR title. This will help us to understand the nature of the changes, and to generate the changelog after all the commits in the PR are squashed.
* Please use the `feat!`, `chore!`, `fix!`... types for breaking changes, as these categories are considered as `breaking change` in the changelog. Please use the `!` to denote a breaking change.
* Please use the `security` type for security fixes, as these categories are considered as `security` in the changelog.
* Please use the `feat` type for new features, as these categories are considered as `feature` in the changelog.
* Please use the `fix` type for bug fixes, as these categories are considered as `bug` in the changelog.
* Please use the `docs` type for documentation updates, as these categories are considered as `documentation` in the changelog.
* Please use the `chore` type for housekeeping commits, including `build`, `ci`, `style`, `refactor`, `test`, `perf` and so on, as these categories are considered as `chore` in the changelog.
* Please use the `deps` type for dependency updates, as these categories are considered as `dependencies` in the changelog.

!!!important
There is a GitHub Actions workflow that will check if your PR title follows the conventional commits convention. If not, it contributes a failed check to your PR.
To know more about the conventions, please refer to the [workflow file](https://github.com/testcontainers/testcontainers-go/blob/main/.github/workflows/conventions.yml).

* use [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/) for your commit messages, as it improves the readability of the commit history, and the review process.
* use [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/) for your commit messages, as it improves the readability of the commit history, and the review process. Please follow the above conventions for the PR title.
* unless necessary, please try to **avoid pushing --force** to the published branch you submitted a PR from, as it makes it harder to review the changes from a given previous state.
* apply format running `make lint-all`. It will run `golangci-lint` for the core and modules with the configuration set in the root directory of the project. Please be aware that the lint stage on CI could fail if this is not done.
* For linting just the modules: `make -C modules lint-modules`
Expand Down
Loading