Skip to content

Edit pull request command#2940

Merged
samcoe merged 1 commit intotrunkfrom
pr-edit
Feb 12, 2021
Merged

Edit pull request command#2940
samcoe merged 1 commit intotrunkfrom
pr-edit

Conversation

@samcoe
Copy link
Contributor

@samcoe samcoe commented Feb 9, 2021

This PR implements the pr edit command allowing the ability to edit a pull request after it has been created. There are some small changes to the issue edit command due to refactoring and renaming in the shared editable code.

Screen Shot 2021-02-10 at 10 13 22 AM

Screen Shot 2021-02-10 at 10 13 58 AM

closes #1349
follow ups #2949

@samcoe samcoe self-assigned this Feb 9, 2021
@samcoe samcoe changed the base branch from trunk to issue-edit February 9, 2021 20:45
@samcoe samcoe changed the title Pr edit command Edit pull request command Feb 10, 2021
@samcoe samcoe force-pushed the pr-edit branch 2 times, most recently from 396d382 to b7bbce5 Compare February 10, 2021 18:22
@samcoe samcoe marked this pull request as ready for review February 10, 2021 18:22
@samcoe samcoe mentioned this pull request Feb 11, 2021
@samcoe samcoe requested a review from a team February 11, 2021 19:16
Copy link
Contributor

@mislav mislav left a comment

Choose a reason for hiding this comment

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

Looks great!

func EditableSurvey(editorCommand string, options *EditableOptions) error {
if options.TitleEdited {
title, err := titleSurvey(options.TitleDefault)
func (e Editable) TitleParam() *githubv4.String {
Copy link
Contributor

Choose a reason for hiding this comment

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

Slight code smell: the Editable type seems tightly coupled to the githubv4 library here. Ideally, it should be agnostic to the transport layer and only converted to appropriate types when the GraphQL query is constructed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Agreed. I will look into ways to decouple them in #2949.

Base automatically changed from issue-edit to trunk February 12, 2021 17:50
@samcoe samcoe merged commit a84145e into trunk Feb 12, 2021
@samcoe samcoe deleted the pr-edit branch February 12, 2021 18:21
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.

Ability to edit title/body/metadata of already open PR

2 participants