Skip to content

Commit

Permalink
chore add fix-pr-base action
Browse files Browse the repository at this point in the history
  • Loading branch information
Mogyuchi committed Jul 31, 2023
1 parent eb93ba5 commit fb35667
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/fix-pr-base.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# SPDX-License-Identifier: MIT

name: Fix pr base

on:
pull_request_target:
types:
- opened
- reopened
branches:
- "main"
- "develop"

permissions:
pull-requests: write

env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_REPO: ${{ github.repository }}
PR_NUMBER: ${{ github.event.number }}

jobs:
change-base_branch:
name: Change base branch
if: |
github.base_ref == 'main' && github.head_ref !== 'develop'
runs-on: ubuntu-latest
steps:
- run: |
gh pr edit $PR_NUMBER --base develop

0 comments on commit fb35667

Please sign in to comment.