You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

What is an update GitHub Status Build Event Handler?

The 'Update Github status Build Event handler' is an event handler (within a configuration) which interacts with the Github Status API.  This feature allows ContinuaCI to mark commits within a GitHub repository with a success, failure, error, or pending state.  The status can then be reflected in any pull requests involving those commits.

Example use case

This event handler works fantastically as a pre-step within a pull request pipeline.  ContinuaCI can be configured to automatically pull the request, build it, test it, and report back its status.

How to create an update GitHub Status Build Event Handler

  1. Navigate to the events tab within the desired Build Configuration
  2. Click the 'Create' link within the 'Build Event Handlers' section



  3. Enter the name of the event handler (in this case 'update github status')
  4. Enter the sequence in which you wish this event handler to be run.  In our case this is the first event handler so we will leave the default of 1
  5. From the type dropdown select 'Update GitHub Status'
  6. Select 'Update GitHub Status' tab from the top of the dialogue



  7. Enter the GitHub API URL (at the time of writing this is https://api.github.com), 
  8. Enter your GitHub Username / Password.  Please note that passwords should not contain any of the following characters: !:@
  9. Enter your access token.  A detailed explanation on how to create and maintain an access token can be found here
  10. Enter the name of the ContinuaCI repositories that you wish to consider when updating status (these can be found on the 'repositories' page).



  11. Click on the 'When to run' tab from the top of the dialogue
  12. Enter the stage timings when this event handler should be run.  For example you may wish an update to be sent when the first stage runs        

 



 

 

 

 

 

 

 

 

 

Statuses can also include an optional description and target_url, and we highly recommend providing them as they make statuses much more useful in the GitHub UI.

As an example, one common use is for continuous integration services to mark commits as passing or failing builds using Status. The target_url would be the full URL to the build output, and the description would be the high level summary of what happened with the build.

  • No labels