-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
VIDCS-3286: Auto-set Base Branch to Develop #26
VIDCS-3286: Auto-set Base Branch to Develop #26
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One question
.github/workflows/auto-set-base.yml
Outdated
- 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 }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not a common case, but I think this should only happen if the target branch is main
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm makes sense!! Doing that.
.github/workflows/auto-set-base.yml
Outdated
|
||
- name: Check and Update Base Branch | ||
run: | | ||
if [ "${{ github.event.pull_request.base.ref }}" == "main" ]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should have the logic be
if TARGET_BRANCH == main && BASE_BRANCH != develop
switch to develop
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, nice idea @dwivedisachin !
What is this PR doing?
This PR adds a GHA job to make develop as the base branch of the PR only on opening the PR. Which will acts as the default moving forward.
Also, we can re-change the default branch once the job is done to whatever we want.
How should this be manually tested?
Notice below the default of this branch is changed to develop by bot
Logs to the job before the last commit to make it run only on opening the PR
What are the relevant tickets?
Resolves VIDCS-3286
[ ] Resolves a
Known Issue
.[ ] If yes, did you remove the item from the
docs/KNOWN_ISSUES.md
?[ ] Resolves an item reported in
Issues
.If yes, which issue? Issue Number?
[ ] If yes, did you close the item in
Issues
?