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

[QoL] Enabling auto-merge on Crowdin PRs #11

Open
shamoon opened this issue May 16, 2023 · 1 comment
Open

[QoL] Enabling auto-merge on Crowdin PRs #11

shamoon opened this issue May 16, 2023 · 1 comment

Comments

@shamoon
Copy link
Member

shamoon commented May 16, 2023

Definitely just a minor quality-of-life thing, but I discovered GH 'auto-merge' which seems like it could be useful for our translation PRs. Essentially when we're ready we just review the PR and poof the rest happens (squash, merge). Apparently the REST API doesn't support it and we'd have to use GraphQL API (or gh cli apparently supports too) https://docs.github.com/en/graphql/reference/mutations#enablepullrequestautomerge

https://github.com/orgs/community/discussions/24719

Again, obviously NBD, for now someone can just open up the PR and click "Enable auto-merge squash" after it gets opened

@bauerj
Copy link
Member

bauerj commented May 19, 2023

I agree, that would be handy.

I wonder if something like

await gh.post("https://github.com/graphql", data=f"""
mutation MyMutation {
    enablePullRequestAutoMerge(input: {pullRequestId: "PR_ID", mergeMethod: MERGE}) {
        clientMutationId
         }
}
""".replace("PR_ID", pull_request_id))

would work with our existing API client.

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

No branches or pull requests

2 participants