Skip to content

Bump msw from 2.6.5 to 2.7.0 in /src/frontend #1397

Bump msw from 2.6.5 to 2.7.0 in /src/frontend

Bump msw from 2.6.5 to 2.7.0 in /src/frontend #1397

name: "Enable auto merge on dependabot and github actions PRs"
on:
pull_request_target:
pull_request:
types: [opened, reopened, ready_for_review]
jobs:
auto-merge:
runs-on: ubuntu-latest
permissions: write-all
if: ${{ github.event.pull_request.user.login != 'dependabot[bot]' }} # Disabled for dependabot due to security restrictions
steps:
- name: Checkout
uses: actions/checkout@v4
with:
token: ${{ secrets.WORKFLOW_TOKEN }}
- name: Enable auto merge on dependabot PRs
if: ${{ github.event.pull_request.draft == false && github.event.pull_request.user.login == 'dependabot[bot]' }}
env:
GH_TOKEN: ${{ secrets.WORKFLOW_TOKEN }} # We're using the github token here which means pushes to dev will not trigger CI
PR_NUMBER: ${{ github.event.number }}
run: gh pr merge --squash --auto $PR_NUMBER
- name: Enable auto squash merge on github actions PRs related to feature branches
if: ${{ github.event.pull_request.draft == false && (contains(github.head_ref, 'feature') || contains(github.head_ref, 'bugfix')) }}
env:
GH_TOKEN: ${{ secrets.WORKFLOW_TOKEN }}
PR_NUMBER: ${{ github.event.number }}
run: gh pr merge --squash --auto $PR_NUMBER
- name: Enable auto merge on github actions PRs related to environment promotions
if: ${{ github.event.pull_request.draft == false && (github.head_ref == 'main' || github.head_ref == 'qa' || github.head_ref == 'test' || github.head_ref == 'dev') }}
env:
GH_TOKEN: ${{ secrets.WORKFLOW_TOKEN }}
PR_NUMBER: ${{ github.event.number }}
run: gh pr merge --merge --auto $PR_NUMBER
# Works only for for single person repo, or potentially it can be expanded on with a key for each user
# - name: Enable auto merge on feature PRs
# uses: daneden/enable-automerge-action@v1
# if: ${{ github.event.pull_request.draft == false && github.event.pull_request.user.login != 'dependabot[bot]' && github.event.pull_request.user.login != 'github-actions[bot]' && github.head_ref == 'dev' }}
# with:
# github-token: ${{ secrets.WORKFLOW_TOKEN }}
# allowed-author: ${{ github.event.pull_request.user.login }}
# merge-method: SQUASH