shipjs
shipjs copied to clipboard
setup: help with protected branch
When using toReleaseBranch
strategy, there can be a possibility that the working branch is protected. It means after release, when Ship.js tries to merge the release branch back to the working branch, it will fail to push the merge commit. In that case, there's nothing much that can be done programmatically.
So if we can check via GitHub API
(1) if this branch is protected (2) and this branch allows force push,
then we can enable forcePushBranches
config by default.
It might be inpossible that pushing to protected branch on GitHub Actions... https://github.community/t5/GitHub-Actions/Allowing-github-actions-bot-to-push-to-protected-branch/m-p/34454#M1924