diff --git a/.github/workflows/pr-lint.yaml b/.github/workflows/pr-lint.yaml new file mode 100644 index 000000000..0e3f2cd63 --- /dev/null +++ b/.github/workflows/pr-lint.yaml @@ -0,0 +1,33 @@ +name: lint pr + +on: + pull_request_target: + types: + - opened + - edited + - synchronize + +permissions: + pull-requests: read + +jobs: + lint-pr: + runs-on: ubuntu-latest + steps: + - uses: amannn/action-semantic-pull-request@v5 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + scopes: | + Core + OpenAI + Orchestration + DevOps + headerPattern: '^(\w.+): (?:\[(\w.+)\] )?(.+)$' + headerPatternCorrespondence: type, scope, subject + # for available types, check: + # https://github.com/commitizen/conventional-commit-types/blob/master/index.json + subjectPatternError: | + The subject "{subject}" found in the pull request title "{title}" + didn't match the configured pattern. Please ensure that the subject + starts with an uppercase character, e.g. "feat: New Feature". diff --git a/.github/workflows/prepare-release.yaml b/.github/workflows/prepare-release.yaml index 1bfc33c60..471a048e8 100644 --- a/.github/workflows/prepare-release.yaml +++ b/.github/workflows/prepare-release.yaml @@ -144,7 +144,7 @@ jobs: run: | COMMIT_URL=${{ github.event.repository.html_url }}/commit/${{ needs.bump-version.outputs.release-commit }} - PR_URL=$(gh pr create --title "Release ${{ needs.bump-version.outputs.release-version }}" --body "## TODOs + PR_URL=$(gh pr create --title "feat: Release ${{ needs.bump-version.outputs.release-version }}" --body "## TODOs - [ ] Review the changes in [the release commit]($COMMIT_URL) - [ ] Review the [Draft Release](${{ needs.create-release.outputs.release-url }}) - [ ] Review **and approve** this PR