mirror of
https://github.com/AntennaPod/AntennaPod.git
synced 2025-12-01 12:31:45 +00:00
Check that PR titles do not reference issue (#8118)
This commit is contained in:
committed by
GitHub
parent
5e6355d514
commit
0e1a5da0de
19
.github/workflows/pr-conventions.yml
vendored
Normal file
19
.github/workflows/pr-conventions.yml
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
name: PR Conventions
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [ opened, synchronize, reopened, edited, labeled, unlabeled ]
|
||||
|
||||
jobs:
|
||||
pr-title:
|
||||
name: "Title"
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Prevent issue reference in title
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
script: |
|
||||
const issueRegex = /#\d+/i;
|
||||
if (issueRegex.test(context.payload.pull_request.title)) {
|
||||
core.setFailed("Please mention the issue number in the PR description, not in the title. Make sure to write 'closes: #<number>'.");
|
||||
}
|
||||
Reference in New Issue
Block a user