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

Migrate search commands to new table printer and add headers #6869

Merged
merged 1 commit into from Jan 18, 2023

Conversation

samcoe
Copy link
Contributor

@samcoe samcoe commented Jan 17, 2023

This PR migrates the search commands to use the new table printer and also adds headers to the TTY output of the search commands.

@samcoe samcoe requested a review from a team as a code owner January 17, 2023 20:55
@samcoe samcoe self-assigned this Jan 17, 2023
@samcoe samcoe requested review from mislav and removed request for a team January 17, 2023 20:55
@cliAutomation cliAutomation added this to Needs review 🤔 in The GitHub CLI Jan 17, 2023
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 good!

@@ -106,7 +106,7 @@ func TestSearchIssues(t *testing.T) {
},
},
},
wantStdout: "test/cli\t123\topen\tsomething broken\tbug, p1\t2021-02-28 12:30:00 +0000 UTC\nwhat/what\t456\tclosed\tfeature request\tenhancement\t2021-02-28 12:30:00 +0000 UTC\nblah/test\t789\topen\tsome title\t\t2021-02-28 12:30:00 +0000 UTC\n",
wantStdout: "test/cli\t123\topen\tsomething broken\tbug, p1\t2021-02-28T12:30:00Z\nwhat/what\t456\tclosed\tfeature request\tenhancement\t2021-02-28T12:30:00Z\nblah/test\t789\topen\tsome title\t\t2021-02-28T12:30:00Z\n",
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice that machine-readable timestamps are now in standardized format 🎉

It's a backwards-incompatible change, though; we should note that in the release notes.

@@ -188,7 +188,7 @@ func TestReposRun(t *testing.T) {
},
},
tty: true,
wantStdout: "\nShowing 3 of 300 repositories\n\ntest/cli of course private, archived Feb 28, 2021\ntest/cliing wow public, fork Feb 28, 2021\ncli/cli so much internal Feb 28, 2021\n",
Copy link
Contributor

Choose a reason for hiding this comment

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

Interesting how in tty mode, these timestamps switched from being absolute to being relative about 1 year ago?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah in tty mode these timestamps changed from using FuzzyAgoAbbr to FuzzyAgo.

The GitHub CLI automation moved this from Needs review 🤔 to Needs to be merged 🎉 Jan 18, 2023
@samcoe samcoe merged commit 5557820 into trunk Jan 18, 2023
The GitHub CLI automation moved this from Needs to be merged 🎉 to Pending Release 🥚 Jan 18, 2023
@samcoe samcoe deleted the search-commands-tables branch January 18, 2023 17:40
@github-actions github-actions bot moved this from Pending Release 🥚 to Done 💤 in The GitHub CLI Jan 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
The GitHub CLI
  
Done 💤
Development

Successfully merging this pull request may close these issues.

None yet

2 participants