Status notifications for Pull Requests

If you have a gitRepo as IN to your runCLI 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 runCLI job will be configured in shippable.jobs.yml as shown below for this scenario:

jobs:
  - name: <name>                                
    type: runCLI                               
    steps:                                      
      - 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 in shippable.resources.yml needs to include the tag buildOnPullRequest: true as shown below:

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

  • If the runCLI 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 runCLI job is in the processing state the GitHub UI will look like Build Status Processing

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

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

Further Reading