Skip to content

Commit

Permalink
[DEV] Fix autoapprove job failing if run multiple times
Browse files Browse the repository at this point in the history
  • Loading branch information
Jomshir98 committed Sep 27, 2023
1 parent c2f2aa2 commit 8cbe519
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 28 deletions.
Original file line number Diff line number Diff line change
@@ -1,41 +1,14 @@
name: PR
name: Automation (Auto-approve)

on:
# Triggers the workflow on any pull request (but runs in context of target branch, having a bit higher rights)
pull_request_target:
types:
- opened
- edited
- synchronize
- labeled
- unlabeled

jobs:
title:
name: Validate PR title
runs-on: ubuntu-latest

steps:
- uses: amannn/action-semantic-pull-request@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
headerPattern: '^\[(\w*)\]:?\s*(.*)$'
headerPatternCorrespondence: type, subject
types: |
FEATURE
ADD
CHANGE
REMOVE
FIX
REFACTOR
DEV
CHORE

automation:
name: Automation tasks
runs-on: ubuntu-latest
concurrency: automation
permissions:
pull-requests: write

Expand Down
33 changes: 33 additions & 0 deletions .github/workflows/pr-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Lint PR

on:
# Triggers the workflow on any pull request (but runs in context of target branch, having a bit higher rights)
pull_request_target:
types:
- opened
- edited
- synchronize
- labeled
- unlabeled

jobs:
title:
name: Validate PR title
runs-on: ubuntu-latest

steps:
- uses: amannn/action-semantic-pull-request@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
headerPattern: '^\[(\w*)\]:?\s*(.*)$'
headerPatternCorrespondence: type, subject
types: |
FEATURE
ADD
CHANGE
REMOVE
FIX
REFACTOR
DEV
CHORE

0 comments on commit 8cbe519

Please sign in to comment.