Skip to content

Commit

Permalink
docs(gitlint): add documentation for Gitlint workflow
Browse files Browse the repository at this point in the history
Closes: #70
  • Loading branch information
koeaw committed Jul 3, 2024
1 parent 6c3f861 commit 6763d18
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
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`:

0 comments on commit 6763d18

Please sign in to comment.