Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@cristiand391
Copy link
Contributor

Closes #1023

This PR adds support for editing the commit message when squash merging a PR.

Spec: #1023 (comment)

The spec for this is converting the confirmation prompt from a y/N prompt to a select with options:

Submit
Edit Commit Message
Edit Commit Author
Cancel

The GraphQL API fails when trying to merge a PR with authorEmail field set, so I avoided adding it for now, would be great if anyone in the cli team can help reporting this to GitHub.
https://github.community/t/graphql-api-fails-when-trying-to-merge-a-pull-request-with-authoremail-field-set/158421

@cristiand391
Copy link
Contributor Author

Tests passed both locally and on my fork: https://github.com/cristiand391/cli/runs/1814289277
Any idea of what's going on?

@samcoe samcoe self-assigned this Feb 4, 2021
@samcoe samcoe force-pushed the squash-edit-commit-msg branch 2 times, most recently from 276acc8 to 15fd3e4 Compare February 4, 2021 23:25
@samcoe samcoe force-pushed the squash-edit-commit-msg branch from 15fd3e4 to 792bd66 Compare February 4, 2021 23:33
@samcoe samcoe force-pushed the squash-edit-commit-msg branch from 792bd66 to 3d6aa69 Compare February 4, 2021 23:44
Copy link
Contributor

@samcoe samcoe left a comment

Choose a reason for hiding this comment

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

It looks like the tests were failing due to not being up to date with trunk and some conflicting changes had been merged in. I rebased trunk, resolved the tests, and added a bit of polish. I think this is good to go now πŸ‘

@samcoe samcoe requested a review from a team February 4, 2021 23:48
@cristiand391
Copy link
Contributor Author

I've pushed some changes to address suggestions πŸ‘πŸΎ

@cristiand391 cristiand391 requested review from mislav and samcoe February 9, 2021 00:32
Copy link
Contributor

Choose a reason for hiding this comment

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

This query looks good for github.com, but this field is not available in GitHub Enterprise 2.22 or lower, and we support those as well. Adding this field would break all pull request queries on GHE.

We have a mechanism for detecting whether a GraphQL field is supported on the remote. I will take over this PR from here and make the query safe for different hosts. In the meantime I will mark the PR as "changes requested" to block merging.

Thank you for all your contribution so far!

@mislav
Copy link
Contributor

mislav commented Feb 16, 2021

@cristiand391 I'm folding your PR into this one that adds auto-merge functionality: #2980

@mislav mislav closed this Feb 16, 2021
@cristiand391 cristiand391 deleted the squash-edit-commit-msg branch March 1, 2021 22:38
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.

Allow editing the commit message when squash-merging a PR

3 participants