Skip to content

Commit

Permalink
Checks if base ref has disallowed strings
Browse files Browse the repository at this point in the history
  • Loading branch information
reederc42 authored Oct 1, 2024
1 parent e0e1fac commit 2b4fe27
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/github-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,21 @@ permissions:
# Optional: allow read access to pull request. Use with `only-new-issues` option.
# pull-requests: read
jobs:
base-ref:
name: base-ref
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.base.ref }}
- name: Check base ref
# Case-insensitive matches for:
# 1. Jira references (trid-12345)
# 2. PR numbers (#1234)
# 3. Squashed commit messages (* message)
run: |
git log --format=%B -n 1 | \
perl -ne 'die "Base ref has invalid commit message" if (/(?:trid|astractl)(?: |-)\d+/ig || /#\d+/ig || /\* \w/ig)'
golangci:
name: linters
runs-on: ubuntu-latest
Expand Down

0 comments on commit 2b4fe27

Please sign in to comment.