[bug] Probot throws error trying to squash and merge, when you can do it on Github UI
See original GitHub issueBug Report
Current Behavior A clear and concise description of the behavior.
// Your code here
await github.pullRequests.merge(
context.repo({
number: pullRequest.number,
commit_title: pullRequest.title,
commit_message: commitMessage,
merge_method: 'squash',
})
);
Expected behavior/code A clear and concise description of what you expected to happen (or code). The bot should merge the PR with ‘squash’ technique.
What is happening is that the bot is giving this error:
Failed to merge PR: You're not authorized to push to this branch. Visit https://help.github.com/enterprise/2.12/user/articles/about-protected-branches/ for more information.
Why is this an issue?
Github allows them to squash and merge from the github UI, so as a consumer of a library, it is unclear why it would give us this error message. I doubt this is an issue in probot, however, not knowing where to create this ticket, I think this is a good place to start.
Environment
- Probot version(s): [e.g. v7.0.0]
- Node/npm version: [e.g. Node 8/npm 5]
- OS: [e.g. Linux]
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:7 (2 by maintainers)
Top Results From Across the Web
Pull request "Squash and merge" button changes author details
The real workaround is for the maintainer to do the merge using the git command line instead of GitHub's UI, but then we...
Read more >support merge_method options · Issue #13 - GitHub
Merges will fail if the repo is configured to disallow merge commits for PRs. Add an option to configure the merge_method to be...
Read more >bot is not automatically merging · Issue #266 - GitHub
We do not have "Require branches to be up to date before merging" ... probot receives the status event and that the app...
Read more >PullRequest "squash and merge" issue #9540 - GitHub
Can you reproduce the bug at https://try.gitea.io: ... The merge conflict is not strange, you squash merged your changes and then applied ...
Read more >Squash commits skip DCO checks · Issue #126 - GitHub
Choose to do a 'Squash and Merge' for the pull request ( see below ) ... I think that might be out of...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks for opening this issue. A contributor should be by to give feedback soon. In the meantime, please check out the contributing guidelines and explore other ways you can get involved.
Thanks for the info. Really appreciate it.