Skip to content

Commit

Permalink
Add workflow rule to prohibit PRs against master
Browse files Browse the repository at this point in the history
  • Loading branch information
veeck committed Feb 7, 2023
1 parent 4b478a5 commit 883ad5c
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 20 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/depsreview.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "Dependency Review"
name: "Review Dependencies"
on: [pull_request]

permissions:
Expand Down
19 changes: 0 additions & 19 deletions .github/workflows/enforce-changelog.yaml

This file was deleted.

28 changes: 28 additions & 0 deletions .github/workflows/enforce-pullrequest-rules.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# This workflow enforces on every pull request:
# - the update of our CHANGELOG.md file
# - that the PR is not based against master

name: "Enforce Pull-Request Rules"

on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review, labeled, unlabeled]

jobs:
check:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Enforce changelog
uses: dangoslen/changelog-enforcer@v3
with:
changeLogPath: "CHANGELOG.md"
skipLabels: "Skip Changelog"

- name: Enforce develop branch
if: ${{ github.base_ref == 'master' }}
run: |
echo "This PR is based against the master branch. Please don't do this. Switch the branch to 'develop'."
exit 1
env:
BASE_BRANCH: ${{ github.base_ref }}
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ Special thanks to @khassel, @rejas and @sdetweil for taking over most (if not al
- Added Yr as a weather provider
- Added config options "ignoreXOriginHeader" and "ignoreContentSecurityPolicy"
- Added thai language
- Added Enforce PR rules workflow

### Removed

Expand Down

0 comments on commit 883ad5c

Please sign in to comment.