DevOps Integrations

Examples

When branch is updated → change state in Targetprocess
When repositories custom field value changes → create branch/merge request

Model Definition

Model Definition

JavaScript for DevOps data source

It is possible to filter Merge Requests that are done to the Master Branch only.

// Function to filter Merge Requests
const isPullRequestToMaster = (devopEvent) => {
  if (devopEvent.SourceEvent) {
    const githubEvent = devopEvent.SourceEvent.payload && (typeof devopEvent.SourceEvent.payload === 'string') ? JSON.parse(devopEvent.SourceEvent.payload) : devopEvent.SourceEvent;
    if (githubEvent) {
      if (githubEvent.pull_request && githubEvent.pull_request.base && githubEvent.pull_request.base.ref === 'master') {
        return true;
      }
    }
  }
  return false;
};

// Usage
if(isPullRequestToMaster(args)){
	// do something here
};