Skip to content

Commit

Permalink
Merge pull request #197 from subhamkrai/add-pr-template
Browse files Browse the repository at this point in the history
docs: add PR template
  • Loading branch information
subhamkrai authored Nov 3, 2023
2 parents dad431f + 6950f0b commit 68ef7c8
Show file tree
Hide file tree
Showing 3 changed files with 92 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .commitlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"extends": [
"@commitlint/config-conventional"
],
"rules": {
"type-enum": [
2,
"always",
[
"build",
"ci",
"core",
"csi",
"doc",
"docs",
"mds",
"mgr",
"mon",
"operator",
"osd",
"test",
"tests"
]
],
"body-leading-blank": [
2,
"always"
],
"footer-leading-blank": [
2,
"always"
],
"body-max-line-length": [
0,
"always"
]
}
}
17 changes: 17 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<!-- Please take a look at our Contributing documentation before submitting a Pull Request!
https://rook.io/docs/rook/latest/Contributing/development-flow/
Thank you for contributing to Rook! -->

**Description of your changes:**

**Which issue is resolved by this Pull Request:**
Resolves #

**Checklist:**

- [ ] **Commit Message Formatting**: Commit titles and messages follow guidelines in the [developer guide](https://rook.io/docs/rook/latest/Contributing/development-flow/#commit-structure).
- [ ] Reviewed the developer guide on [Submitting a Pull Request](https://rook.io/docs/rook/latest/Contributing/development-flow/#submitting-a-pull-request)
- [ ] CI tests has been updated, if necessary.
- [ ] Documentation has been updated, if necessary.
- [ ] Unit tests have been added, if necessary.
37 changes: 37 additions & 0 deletions .github/commitlint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Commitlint
on:
push:
tags:
- v*
branches:
- master
- release-*
pull_request:
branches:
- master
- release-*

# cancel the in-progress workflow when PR is refreshed.
concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
cancel-in-progress: true

permissions:
contents: read

jobs:
lint:
permissions:
contents: read # for actions/checkout to fetch code
pull-requests: read # for wagoid/commitlint-github-action to get commits in PR
runs-on: ubuntu-20.04
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: wagoid/[email protected]
with:
configFile: "./.commitlintrc.json"
helpURL: https://rook.io/docs/rook/latest/Contributing/development-flow/#commit-structure

0 comments on commit 68ef7c8

Please sign in to comment.