mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-27 03:39:55 +00:00
Enforce PRs to be based against develop branch (#3031)
"Inspired" by my mistake in https://github.com/MichMich/MagicMirror/pull/3028 this PR will add a worfklow check for the branch a PR is based against. Open question is if this prevents @MichMich from preparing a release? --------- Co-authored-by: veeck <michael@veeck.de>
This commit is contained in:
parent
e24dfa6b1a
commit
88c7e42368
6
.github/workflows/automated-tests.yaml
vendored
6
.github/workflows/automated-tests.yaml
vendored
@ -20,14 +20,14 @@ jobs:
|
||||
matrix:
|
||||
node-version: [14.x, 16.x, 18.x]
|
||||
steps:
|
||||
- name: Checkout code
|
||||
- name: "Checkout code"
|
||||
uses: actions/checkout@v3
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
- name: "Use Node.js ${{ matrix.node-version }}"
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
cache: "npm"
|
||||
- name: Install dependencies and run tests
|
||||
- name: "Install dependencies and run tests"
|
||||
run: |
|
||||
Xvfb :99 -screen 0 1024x768x16 &
|
||||
export DISPLAY=:99
|
||||
|
6
.github/workflows/codecov-test-suites.yaml
vendored
6
.github/workflows/codecov-test-suites.yaml
vendored
@ -17,16 +17,16 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
steps:
|
||||
- name: Checkout code
|
||||
- name: "Checkout code"
|
||||
uses: actions/checkout@v3
|
||||
- name: Install dependencies and run coverage
|
||||
- name: "Install dependencies and run coverage"
|
||||
run: |
|
||||
Xvfb :99 -screen 0 1024x768x16 &
|
||||
export DISPLAY=:99
|
||||
npm ci
|
||||
touch css/custom.css
|
||||
npm run test:coverage
|
||||
- name: Upload coverage results to codecov
|
||||
- name: "Upload coverage results to codecov"
|
||||
uses: codecov/codecov-action@v3
|
||||
with:
|
||||
files: ./coverage/lcov.info
|
||||
|
6
.github/workflows/depsreview.yaml
vendored
6
.github/workflows/depsreview.yaml
vendored
@ -1,4 +1,8 @@
|
||||
name: "Dependency Review"
|
||||
# This workflow scans your pull requests for dependency changes, and will raise an error if any vulnerabilities or invalid licenses are being introduced.
|
||||
# For more information see: https://github.com/actions/dependency-review-action
|
||||
|
||||
name: "Review Dependencies"
|
||||
|
||||
on: [pull_request]
|
||||
|
||||
permissions:
|
||||
|
19
.github/workflows/enforce-changelog.yaml
vendored
19
.github/workflows/enforce-changelog.yaml
vendored
@ -1,19 +0,0 @@
|
||||
# This workflow enforces the update of a changelog file on every pull request
|
||||
# For more information see: https://github.com/dangoslen/changelog-enforcer
|
||||
|
||||
name: "Enforce Changelog"
|
||||
|
||||
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"
|
28
.github/workflows/enforce-pullrequest-rules.yaml
vendored
Normal file
28
.github/workflows/enforce-pullrequest-rules.yaml
vendored
Normal file
@ -0,0 +1,28 @@
|
||||
# This workflow enforces on every pull request:
|
||||
# - the update of our CHANGELOG.md file, see: https://github.com/dangoslen/changelog-enforcer
|
||||
# - that the PR is not based against master, taken from https://github.com/oppia/oppia-android/pull/2832/files
|
||||
|
||||
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' && !contains(github.event.pull_request.labels.*.name, 'mastermerge') }}
|
||||
run: |
|
||||
echo "This PR is based against the master branch and not a release or hotfix."
|
||||
echo "Please don't do this. Switch the branch to 'develop'."
|
||||
exit 1
|
||||
env:
|
||||
BASE_BRANCH: ${{ github.base_ref }}
|
@ -65,6 +65,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 workflow rule to make sure PRs are based against develop
|
||||
|
||||
### Removed
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user