Skip to content

Commit

Permalink
docs: adding docs conventional commit, adapt conditional labeling
Browse files Browse the repository at this point in the history
  • Loading branch information
signorecello committed Oct 24, 2023
1 parent dcda1c7 commit e1d1dc5
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .github/workflows/build-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,14 @@ jobs:
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const PR_TITLE_PREFIX = 'docs:';
const LABEL_NAME = 'documentation';
const DOC_PATH_PREFIX = 'docs/';
const prTitle = context.payload.pull_request.title;
const labels = context.payload.pull_request.labels.map(label => label.name);
if (labels.includes('documentation')) {
if (labels.includes(LABEL_NAME) || prTitle.startsWith(PR_TITLE_PREFIX)) {
return true;
}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/pull-request-title.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,4 @@ jobs:
fix
feat
chore
docs
1 change: 1 addition & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ Generally, we want to only use the three primary types defined by the specificat
- `feat:` - This should be the most used type, as most work we are doing in the project are new features. Commits using this type will always show up in the Changelog.
- `fix:` - When fixing a bug, we should use this type. Commits using this type will always show up in the Changelog.
- `chore:` - The least used type, these are __not__ included in the Changelog unless they are breaking changes. But remain useful for an understandable commit history.
- `docs` - If your changes are only on the docs, use this type

### Conventional Commits: Breaking Changes

Expand Down

0 comments on commit e1d1dc5

Please sign in to comment.