Status notifications for Pull Requests

If you have a gitRepo as IN to your runSh job, you can see the job status for pull requests to your git repository.

You can turn this ON or OFF using the showBuildStatus tag in the gitRepo resource.

For example, the runSh job will be configured as shown below for this scenario:

  - name: <name>                                
    type: runSh                             
      - IN: myGitRepo                           
        showBuildStatus: true    #set to true if you want job status to be shown in your SCM UI
      - TASK:
        - script: <command>
        - script: <command>

The corresponding gitRepo resource needs to include the tag buildOnPullRequest: true as shown below:

  - name: myGitRepo                             
    type: gitRepo                               
    integration: <integrationName>             
      sourceName: <repoName>                    
      branch: <branchName>                      
      buildOnPullRequest: true     #specify true to trigger the job for pull requests to the git repository

  • If the runSh job is triggered as a result of the a pull request for the configured repo (repoName) and (branchName), the build status message be displayed in the UI of your source control provider.

  • When the runSh job is in the processing state the GitHub UI will look like Build Status Processing

  • When the runSh job successfully completes, the GitHub UI will look like Build Status Success

  • When the runSh job is cancelled or failed the GitHub UI will look like Build Status Failed

Further Reading