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

docs(gitlint): add documentation for Gitlint workflow #74

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
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
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ various repositories of the Prosopograhy and Networks group at the

* [add-to-project](docs/add-to-project.md)
* [deploy-apis-instance.yml](docs/deploy-apis-instance.md)
* [gitlint.yml](docs/gitlint.md)
* [poetry-black](docs/poetry-black.md)

* poetry-deptry.yml
Expand Down
38 changes: 38 additions & 0 deletions docs/gitlint.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Documentation for `gitlint.yml` workflow

[gitlint.yml](https://github.com/acdh-oeaw/prosnet-workflows/.github/workflows/gitlint.yml) is a reusable GitHub workflow for linting Git commit messages with [Gitlint](https://jorisroovers.com/gitlint/latest/).


## How to use

Create a new workflow file in all repositories whose Git commit messages should get linted with Gitlint.

The following example config runs the workflow on all pull requests which target the containing repository's default branch:

```yml
name: Run Gitlint

on:
pull_request:

jobs:
gitlint:
uses: acdh-oeaw/prosnet-workflows/.github/workflows/gitlint.yml@RELEASE_VERSION
with:
basebranch: ${{ github.event.repository.default_branch }}
```


### Required settings

* `RELEASE_VERSION` needs to be set to a valid prosnet-workflows [release tag](https://github.com/acdh-oeaw/prosnet-workflows/releases), branch name or SHA.

### Optional settings

The following optional variables can be added to the `with` section:

* `arguments`:
* `basebranch`:
* `comment`:
* `contrib`:
* `ignore`: