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

feat: force push to protected branch with explicit config #813

Merged
merged 1 commit into from
May 12, 2020

Conversation

eunjae-lee
Copy link
Contributor

@eunjae-lee eunjae-lee commented May 11, 2020

fixes #805

@eunjae-lee
Copy link
Contributor Author

Hey @tyankatsu0105, can you review this? 🙂

run({ command: `git push origin-with-token ${ref}`, dir, dryRun });
const force = forcePushBranches.includes(ref);
run({
command: `git push${force ? ' -f' : ''} origin-with-token ${ref}`,
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

@tyankatsu0105
Copy link
Contributor

@eunjae-lee
LGTM.
Please check the following:

  1. We need to add this feature to documentation.
  2. How about adding default value to addShipConfig.js, when user choose toReleaseBranch strategy?

@eunjae-lee
Copy link
Contributor Author

  1. Yes, we need to document it. I'll prepare another PR for that.
  2. About setup step, I think this shouldn't be enabled by default when using toReleaseBranch. If we call some GitHub API and confirms if the branch is protected, then we could enable this, but we still have to tell user that they should "Allow" force push to the branch. What do you think?

@tyankatsu0105
Copy link
Contributor

  1. OK.
  2. Totally I agree with your opinion.

@eunjae-lee eunjae-lee merged commit 3647853 into master May 12, 2020
@eunjae-lee eunjae-lee deleted the feat/force-push branch May 12, 2020 11:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Protected branch update failed for xxx
2 participants