Skip to content
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

Auto PR with Auto merge for syncing master-v2 #1604

Merged
merged 6 commits into from
Jun 30, 2020
Merged

Conversation

souradeep-das
Copy link
Contributor

@souradeep-das souradeep-das commented Jun 24, 2020

Overview

Create/modify a PR and auto-merge to sync master-v2 with changes pushed to master

Flow

  • Opens a pull request (`master` -> `master-v2` when changes are pushed to master
  • If there is no merge conflicts
    1. Auto attach the label `sync master-v2` to the PR
    2. Auto Merge the PR
  • If there are merge conflicts
    1. Fix conflicts manually
    2. Auto attaches label `sync master-v2` to the PR
    3. Manually merge the PR

Additional settings

  1. Please add omisego-bot's token under the name HOUSE_KEEPER_BOT_TOKEN
  2. We probably need to do away with some branch rules for master-v2 to easily auto-merge
    1. require pull request reviews for master-v2
    2. require status checks to pass before merging. ( since it just reflects the master branch, waiting introduces complications :( )

@InoMurko
Copy link
Contributor

is there a way to auto-merge PR if there are not conflicts?

@souradeep-das
Copy link
Contributor Author

souradeep-das commented Jun 24, 2020

@InoMurko Interesting! Looks like this could do this https://developer.github.com/v3/pulls/#merge-a-pull-request unless that makes way for further complications

@InoMurko
Copy link
Contributor

This should help us reduce steps and friction to the minimum!

@souradeep-das
Copy link
Contributor Author

souradeep-das commented Jun 24, 2020

How are we planning to tackle merge conflicts (if they come up)? Should we have a master-master-copy-master-v2 flow and make the auto PR's from master-copy->master-v2? or do we go with the option of creating a new head branch for every conflicting change? @boolafish @InoMurko
of course the second option probably makes more sense, just making sure.
Also since we want an auto-merge, do we remove pull request reviews from master-v2 or maybe reduce it to one?

Copy link
Contributor

@boolafish boolafish left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we are introducing auto merge, I guess we can auto merge master -> master-v2 directly.
If there is conflict, the engineer fixing the conflict would branch out him/herself and propose PR to merge to master-v2. This should work, right?

But anything works should be fine :p

@souradeep-das
Copy link
Contributor Author

Yeah totally. Branching out on conflicts should work.

@boolafish
Copy link
Contributor

remove pull request reviews from master-v2 or maybe reduce it to one?

A trolling idea, we can have multiple bot approving 😂

@souradeep-das souradeep-das changed the title Auto PR for syncing master-v2 Auto PR with Auto merge for syncing master-v2 Jun 26, 2020
@souradeep-das
Copy link
Contributor Author

@boolafish added the auto-merge. Lmk if this is in order.

Copy link
Contributor

@boolafish boolafish left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cool

@souradeep-das
Copy link
Contributor Author

Could we get a check if the settings have been applied before merge.

@InoMurko
Copy link
Contributor

Could we get a check if the settings have been applied before merge.

I'm perhaps out of the loop, what do you mean by that? Which settigs? master1->master2?

@souradeep-das
Copy link
Contributor Author

@InoMurko mostly the branch restrictions and adding the access token for the omisego-bot. Redirecting to #1604 (comment) under the additional settings section

@InoMurko
Copy link
Contributor

Please add omisego-bot's token under the name HOUSE_KEEPER_BOT_TOKEN
If I remember correctly, @unnawut you fixed a thing once for me so that comments were submitted with this bot. can you do ti here as well?

Copy link
Contributor

@achiurizo achiurizo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Following up from discussion, I think settings are good to go here for this PR.

@souradeep-das
Copy link
Contributor Author

Thanks 👍 , ohh so the bot's token is also added now?

@boolafish
Copy link
Contributor

HOUSE_KEEPER_BOT_TOKEN added!

@souradeep-das souradeep-das merged commit cbece84 into master Jun 30, 2020
@souradeep-das souradeep-das deleted the souradeep/autopr branch June 30, 2020 07:07
@unnawut unnawut added the chore Technical work that does not affect service behaviour label Aug 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Technical work that does not affect service behaviour
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants