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

kodiak cannot update PRs made between self-owned organizations #257

Closed
chdsbd opened this issue Jan 20, 2020 · 2 comments
Closed

kodiak cannot update PRs made between self-owned organizations #257

chdsbd opened this issue Jan 20, 2020 · 2 comments
Labels
bug Something isn't working github-api-limitation

Comments

@chdsbd
Copy link
Owner

chdsbd commented Jan 20, 2020

Given a user "bob" with repository "bob/cake-api" who is a member of "acme-corp", if "bob" forks "bob/cake-api" to "acme-corp/cake-api", makes a commit to "acme-corp/cake-api" and opens a PR against "bob/cake-api" with his new changes, "bob" will not have the option to select "Allow edits from maintainers". This means Kodiak will not be able to update the PR and "bob" will not be able to allow Kodiak to do so because the "Allow edits from maintainers" checkbox is missing.

I've confirmed via the GitHub API that maintainer_can_modify is false for PRs opened using the flow described above and that the "Allow edits from maintainers" checkbox is also hidden in PRs opened using this flow.

related #104 (comment)

more examples

acme-corp/cake-api (main repository)
    -> bob/cake-api (fork)

Bob pushes a branch, add-endpoint, to bob/cake-api. He opens a PR against acme-corp/cake-api. The "Allow edits from maintainers" checkbox is hidden when opening the PR (this is the GitHub bug). Kodiak cannot update Bob's branch in bob/cake-api and Kodiak errors.

@chdsbd chdsbd added bug Something isn't working github-api-limitation labels Jan 20, 2020
@chdsbd
Copy link
Owner Author

chdsbd commented Mar 26, 2021

The workaround is to push your branch to the main repository and make the pull request using the branch in the main repository instead of the fork.

This error appears in Kodiak's GitHub status checks as:

API call 'pull_request/merge' failed with HTTP status '403' and response: 'b'{"message":"Resource not accessible by integration","documentation_url":"https://docs.github.com/rest/reference/pulls#merge-a-pull-request"}\''

@chdsbd
Copy link
Owner Author

chdsbd commented Mar 26, 2021

It seems like this original issue was fixed at some point in time. There's a second, different issue around GitHub Repository Secrets that I thought was related. Here's a new ticket for that issue: #641

I'm closing this ticket as it's no longer valid.

@chdsbd chdsbd closed this as completed Mar 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working github-api-limitation
Projects
None yet
Development

No branches or pull requests

1 participant