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

meta: fix auto-update failing on forks #17280

Merged
merged 4 commits into from
Apr 13, 2024
Merged

meta: fix auto-update failing on forks #17280

merged 4 commits into from
Apr 13, 2024

Conversation

ephys
Copy link
Member

@ephys ephys commented Apr 12, 2024

Description of Changes

The API endpoint to update branch does not allow updating branches from forks, even if the PR specifies that maintainers are allowed to push commits on it.

As a solution, forks are now updated via git instead of the GitHub API: https://github.com/sequelize/pr-auto-update-and-handle-conflicts/blob/74929c430b8843e691e7b83d229d8d13d78d89e3/src/action.ts#L331-L398

This update operation requires using the PAT of a maintainer instead of a bot as the permissions of the bot do not apply to forks

PR & workflow run showing that this works:


Also, it looks like the changelog deletion still does not work :(

@ephys ephys requested a review from a team as a code owner April 12, 2024 12:16
@ephys ephys requested a review from WikiRik April 12, 2024 12:16
@ephys ephys changed the title meta: auto-update PRs from forks meta: fix auto-update failing on forks Apr 12, 2024
Copy link
Member

@WikiRik WikiRik left a comment

Choose a reason for hiding this comment

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

Changelog and also the lint staged (although that could still be a Codepaces issue) both don't seem to work atm

@ephys
Copy link
Member Author

ephys commented Apr 12, 2024

lint-staged doesn't work for me either, it runs but it doesn't prevent the commit

@WikiRik
Copy link
Member

WikiRik commented Apr 13, 2024

@ephys I'll let you merge this one, in case you want to do something additional with this

@ephys ephys enabled auto-merge (squash) April 13, 2024 11:50
@ephys ephys merged commit 823baa4 into main Apr 13, 2024
53 checks passed
@ephys ephys deleted the ephys/update-forks branch April 13, 2024 12:11
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.

None yet

2 participants