-
Notifications
You must be signed in to change notification settings - Fork 131
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added GitHub Action to rebase release PRs to develop
- Loading branch information
Showing
1 changed file
with
34 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# | ||
# This workflow catches PRs made to 'release' and rebases them onto 'develop' | ||
# | ||
|
||
name: rebase-pr | ||
|
||
on: | ||
pull_request: | ||
types: [opened] | ||
branches: | ||
- release | ||
|
||
jobs: | ||
rebase-pr: | ||
name: Rebase pull request | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Perform rebase | ||
uses: actions/github-script@v7 | ||
with: | ||
script: | | ||
github.rest.pulls.update({ | ||
pull_number = context.pull.number, | ||
owner = context.repo.owner, | ||
repo = context.repo.repo, | ||
base = "develop" | ||
}); | ||
github.rest.issues.createComment({ | ||
issue_number = context.pull.number, | ||
owner = context.repo.owner, | ||
repo = context.repo.repo, | ||
body = "Thanks for your contribution! We don't accept pull requests to the `release` branch. I have rebased your pull request onto `develop`, check for any conflicts." | ||
}); |