Ability to retrieve build statuses for pull requests or commits via REST API

XMLWordPrintable

    • 3

      Current behaviour

      • There is no REST API available to retrieve build statuses for a particular Pull Request.
      • Previously, the workaround was:
        1. Get the latest commit of the Pull Request using the Get pull request endpoint.
        2. Using the commit, retrieve the build statuses.

      After the Get build statuses for commit endpoint was deprecated, there is no longer a way to retrieve build statuses for a particular commit.

      Suggested behaviour

      • Provide an endpoint for the following scenario:
        • Get build statuses for a Pull Request.
        • Get build statuses for a commit.

      Workaround

      Please be aware that the following are not REST API endpoints; they are UI endpoints. As such, they are subject to change at any time in the future. These endpoints are undocumented and are not recommended for use in scripts, as they may change unpredictably.

      • To retrieve build statuses for a Pull Request:
        GET $BASE_URL/rest/ui/latest/projects/$PROJECT_KEY/repos/$REPO_SLUG/pull-requests/$PR_ID/builds?start=0&limit=25
        
      • To retrieve build statuses for a commit:
        GET $BASE_URL/rest/ui/latest/projects/$PROJECT_KEY/repos/$REPO_SLUG/builds?at=$COMMIT_HASH&start=0&limit=25
        

            Assignee:
            Unassigned
            Reporter:
            Moga
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: