Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .github/workflows/pr-lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: lint pr

on:
pull_request_target:
types:
- opened
- edited
- synchronize
Comment on lines +3 to +8
Copy link
Contributor

@newtork newtork Jan 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Comment/Opinion)

I didn't expect this syntax to be mandatory.

  • It may discourage future, external contributors.
  • It may break current and future automated PRs.

It's not possible to make this more like a warning/notification right?

Copy link
Member Author

@MatKuhr MatKuhr Jan 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

more like a warning

No, at least not per the docs. I checked that it works with Dependabot, but Release PRs would currently fail. Updated the script ✅. For external contributors it should be fine, because it is easy to fix and only occurs after a PR is already raised, i.e. when most of the work is already done.


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

Check warning on line 29 in .github/workflows/pr-lint.yaml

View check run for this annotation

In Solidarity / Inclusive Language

Match Found

Please consider an alternative to `master`. Possibilities include: `primary`, `main`, `leader`, `active`, `writer`
Raw output
/\b(?!masterdata|masterdata\w+\b)master/gi
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".
2 changes: 1 addition & 1 deletion .github/workflows/prepare-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading