Skip to content

Would like to retrieve do Build Id  #3739

Description

@joaovic

Describe the feature or problem you’d like to solve

Our Enterprise Github account has an integration with AWS Code Build that send to Github information about the generated build id for each repository commit (i.e PR creation and also for PR merging into master branch). I would like to capture that generated Build ID highlighted in the image bellow.

Proposed solution

Would like to have an CLI command to provided that information.
Ex: gh pr check --build-id

How will it benefit CLI and its users?

It would enhance bash script capabilities that integrate with CI deployments with Harness that use that generated build id.

Additional context

Add any other context like screenshots or mockups are helpful, if applicable.

image

Activity

  1. mislav commented on Jun 1, 2021

    @mislav
    Contributor

    Hi, thanks for writing in explaining how this would be useful.

    If you do gh pr view <PR> --json statusCheckRollup, can you spot if the wanted built ID is anywhere in that output? If so, could you share with us that output? This would help us figure out where this build ID is stored.

    Ref. #3477 #3558 #4001

  2. joaovic commented on Aug 10, 2021

    @joaovic
    Author

    Hi, thanks for your response.

    This is the output for PR #56: gh pr view 56 --json statusCheckRollup

    Image:
    image

    Text:
    { "statusCheckRollup": [ { "__typename": "StatusContext", "name": "", "context": "AWS CodeBuild us-east-1 (partner-communication-codebuild-build)", "state": "SUCCESS", "status": "", "conclusion": "", "startedAt": "0001-01-01T00:00:00Z", "completedAt": "0001-01-01T00:00:00Z", "detailsUrl": "", "targetUrl": "https://us-east-1.console.aws.amazon.com/codebuild/home?region=us-east-1#/builds/partner-communication-codebuild-build:41b60cee-a407-4c28-9e70-b8b024231bc3/view/new" }, { "__typename": "StatusContext", "name": "", "context": "PicPay Pipeline", "state": "SUCCESS", "status": "", "conclusion": "", "startedAt": "0001-01-01T00:00:00Z", "completedAt": "0001-01-01T00:00:00Z", "detailsUrl": "" } ] }


    I would like to capture the number 282 (Build Id) in the output.

    image

  3. mislav commented on Aug 10, 2021

    @mislav
    Contributor

    Thanks for clarifying! It looks like we don't offer any facilities to fetch this information right now. I do believe we should allow access to it somehow.

  4. Codex- commented on Aug 17, 2021

    @Codex-

    I've built a couple of github actions that might help your case, please see: #4001 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementa request to improve CLIgh-prrelating to the gh pr command

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions