VIDCS-3286: Auto-set Base Branch to Develop #1
Workflow file for this run
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
name: Auto-set Base Branch to Develop | |
on: | |
pull_request: | |
types: [opened] | |
jobs: | |
set-base-branch: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Check and Update Base Branch | |
run: | | |
if [ "${{ github.event.pull_request.base.ref }}" != "develop" ]; then | |
gh pr edit ${{ github.event.pull_request.number }} --base develop | |
echo "Base branch updated to 'develop'."; | |
else | |
echo "Base branch is already 'develop'."; | |
fi | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |