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

Add author information in pr list JSON output #5049

Open
wants to merge 1 commit into
base: trunk
Choose a base branch
from

Conversation

hirasawayuki
Copy link
Contributor

@hirasawayuki hirasawayuki commented Jan 16, 2022

Fixes #4912

Add author information to be output by the pr list command.
Following commands can be used to check the operation:

$ go run cmd/gh/main.go --repo {your repository} pr list --search --json id,title,url,author

type: User

[
  {
    "author": {
      "id": "xxxxxxxxxx",
      "is_bot": false,
      "login": "xxxxxxxxxx",
      "name": "xxxxxxxxxx"
    },
    "id": "xxxxxxxxxx",
    "title": "xxxxxxxxxx",
    "url": "https://github.com/xxxxxxxxxx"
  },

type: Bot(dependabot)

[
  {
    "author": {
      "is_bot": true,
      "login": "app/dependabot"
    },
    "id": "xxxxxxxxxx",
    "title": "Bump xxxxxxxxxx",
    "url": "https://github.com/xxxxxxxxx"
  },

@hirasawayuki hirasawayuki requested a review from as a code owner Jan 16, 2022
@hirasawayuki hirasawayuki requested review from vilmibm (assigned from cli/code-reviewers) and removed request for Jan 16, 2022
@cliAutomation cliAutomation added the external label Jan 16, 2022
@cliAutomation cliAutomation added this to Needs review 🤔 in The GitHub CLI Jan 16, 2022
@samcoe
Copy link
Member

@samcoe samcoe commented Mar 29, 2022

This might be a bit of feature creep but just wanted to chime in here since search issues and search prs just landed that we should extend the isBot export field to those two commands as well as issue list so that all these commands have a uniform interface.

After this lands I think #4045 can be closed as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
external
Projects
The GitHub CLI
  
Needs review 🤔
Development

Successfully merging this pull request may close these issues.

4 participants