Skip to content

Commit

Permalink
ci: Move semantic-pr into templates repo (#408)
Browse files Browse the repository at this point in the history
Signed-off-by: Oliver Koenig <okoenig@nvidia.com>
  • Loading branch information
ko3n1g authored Nov 19, 2024
1 parent 32a2b77 commit 5075f94
Showing 1 changed file with 2 additions and 39 deletions.
41 changes: 2 additions & 39 deletions .github/workflows/semantic-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,42 +23,5 @@ permissions:

jobs:
semantic-pull-request:
# This job validates that the title of this pull-request matches the
# [conventional-commit-types](https://github.com/commitizen/conventional-commit-types/blob/master/index.json).
# We use squash-based merging, so the PRs semantic title will become
# the squashed commit message's title.
# This allows follow-up actions, like automated changelog-generation.
# Also, standardized and beautiful commit messages!
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Semantic PR title
uses: amannn/action-semantic-pull-request@v5
with:
types: |
feat
fix
docs
style
refactor
perf
test
build
ci
chore
revert
- name: PR title length
if: always()
env:
PR_NUMBER: ${{ github.event.number }}
REPOSITORY: ${{ github.repository }}
run: |
PR=$(curl -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer $GITHUB_TOKEN" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/$REPOSITORY/pulls/$PR_NUMBER)
test $(echo -E $PR | jq '.title | length') -le 80;
uses: NVIDIA/NeMo-FW-CI-templates/.github/workflows/_semantic_pull_request.yml@v0.13.0

0 comments on commit 5075f94

Please sign in to comment.