Skip to content

Add branch name to gh pr list - #3

Merged
probablycorey merged 3 commits into
prototypefrom
add-head-ref-name
Oct 9, 2019
Merged

Add branch name to gh pr list#3
probablycorey merged 3 commits into
prototypefrom
add-head-ref-name

Conversation

@probablycorey

Copy link
Copy Markdown
Contributor

It was bugging me that our text prototypes had the branch name in the PR list but our prototype didn't. Now that we use graphql to get PR information we can display the branch names!

Here is what it looks like in this PR.

@probablycorey
probablycorey requested a review from a team October 7, 2019 18:27

@mislav mislav left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Awesome! 🎉

Comment thread command/pr.go
{{- if . }}
{{- range .}}
#{{.Number}} {{.Title}}
#{{.Number}} {{.Title}} {{cyan "[" .HeadRefName "]"}}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should the branch name also include the OWNER: portion if the pull request is coming from a different repo? This would match how head branches are shown on GitHub web.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

That's a good idea. When this goes into master let's do it!

@tierninho
tierninho self-requested a review October 9, 2019 01:44

@tierninho tierninho left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Based on the commits, it looks as if this is the change. The bold, cyan text for the branch name.

Screen Shot 2019-10-08 at 3 45 06 PM
Screen Shot 2019-10-09 at 10 41 58 AM

@probablycorey
probablycorey merged commit e254649 into prototype Oct 9, 2019
@probablycorey
probablycorey deleted the add-head-ref-name branch October 9, 2019 20:12
mislav pushed a commit that referenced this pull request Sep 28, 2021
jtmcg added a commit that referenced this pull request Mar 12, 2025
…mers (#3)

* Separate partitioning from globbing in cmdutil/args package and consumers

In the previous commit, GlobPaths was overloaded, containing logic
specific to command use-cases. This commit removes that functionality from
GlobPaths and back into the commands that have the special use-cases.

To do this, I've introduced a new Partition util in cmdutil/args.go that
will separate a slice into two slices given a predicate. This functionality
is leveraged by both the special use-cases described above to separate the
command-specific syntax from the globable filepaths.

* Add test to validate that the order of '-' in gh gist create args doesn't matter

@ghos6t69-del ghos6t69-del left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

.

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.

5 participants