-
Notifications
You must be signed in to change notification settings - Fork 115
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
addition of auto-branching process as part of github action #14385
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.
This will be great to have! Just a couple of small things.
7f98f81
to
07fe479
Compare
90224e1
to
3b9ff90
Compare
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.
ACK. No blockers for merge, but there is a missing newline at the end of the file.
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.
ACK pending comments / questions!
3b9ff90
to
ce7d235
Compare
git config --local user.name "GitHub Action" | ||
branch_name="auto-branching-${{ github.event.inputs.target_branch }}-$(date '+%s')" | ||
git checkout -b "$branch_name" | ||
git add setup.py ./tests/foreman ./robottelo/* ./requirements.txt ./.github/* ./conf/robottelo.yaml.template |
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.
why not add everything changed?
git add setup.py ./tests/foreman ./robottelo/* ./requirements.txt ./.github/* ./conf/robottelo.yaml.template | |
git add . |
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.
it's often safer to use the explicit approach to avoid accidentally including unintended changes.
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.
In any case, it'll open up a PR for us to review and merge, and if we encounter any accidentally or unintended changes in it, we can manually mitigate them, right?
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.
I don't think so it is right approach git add .
. I personally never do that on my local machine even. @jyejare @JacobCallahan do you feel the same ?
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.
git add -u
only adds file those which are already part of vc and not those are new. So in any case if we add a new file now or later then it would be missed.
So its better to be explicit here.
ce7d235
to
a642b37
Compare
57dff63
to
730302e
Compare
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.
ACK with Gauravs comments to be resolved.
730302e
to
48363be
Compare
@Gauravtalreja1 Feel free to merge when you are good. |
Problem Statement
Currently the branching process is manual and it requires to review the files needs to be updated. Also requires attention in details as there are many files changes with respect to multiple branches as well. We need to have some automated solution that will help in the solve this.
Solution
Introducing the Github Action that will help to solve this issue. It will contains the steps that needs to run every time when we needs branching. These are predefined steps and getting documented help to not to miss the some changes
Test Result
I have tested on my own fork and here it is the result
- work_flow trigger:
- non-master branch workflow and PR:
- omkarkhatavkar#267
- master branch workflow and PR:
- omkarkhatavkar#266