Source:
<code>public void sendNotifications( Map preference, final String application, final Event event, Map config, final String status) { EventContent content = null; try { content = new EventContent(event, (String) config.get("type")); } catch (FieldNotFoundException e) { return; } String state = STATUSES.get(status); String description; String context; String targetUrl; if (config.get("type").equals("stage")) { description = String.format("Stage '%s' in pipeline '%s' is %s", content.getStageName(), content.getPipeline(), status); context = String.format("stage/%s", content.getStageName()); targetUrl = String.format("%s/#/applications/%s/executions/details/%s?pipeline=%s&stage=%d", getSpinnakerUrl(), application, content.getExecutionId(), content.getPipeline(), content.getStageIndex()); } else if (config.get("type").equals("pipeline")) { description = String.format("Pipeline '%s' is %s", content.getPipeline(), status); context = String.format("pipeline/%s", content.getPipeline()); targetUrl = String.format("%s/#/applications/%s/executions/details/%s?pipeline=%s", getSpinnakerUrl(), application, content.getExecutionId(), content.getPipeline()); } else { return; } log.info(String.format("Sending Github status check for application: %s", application)); String branchCommit = getBranchCommit(content.getRepo(), content.getSha()); GithubStatus githubStatus = new GithubStatus(state, targetUrl, description, context); try { final String repo = content.getRepo(); retrySupport.retry( () -> githubService.updateCheck("token " + token, repo, branchCommit, githubStatus), MAX_RETRY, RETRY_BACKOFF, <START> true); <END> } catch (Exception e) { log.error(String.format("Failed to send github status for application: '%s' pipeline: '%s', %s", application, content.getPipeline(), e)); } }</code><technical_language>tend do exponential backoff in other areas of code</technical_language>

Target:
public void sendNotifications( Map preference, final String application, final Event event, Map config, final String status) { EventContent content = null; try { content = new EventContent(event, (String) config.get("type")); } catch (FieldNotFoundException e) { return; } String state = STATUSES.get(status); String description; String context; String targetUrl; if (config.get("type").equals("stage")) { description = String.format("Stage '%s' in pipeline '%s' is %s", content.getStageName(), content.getPipeline(), status); context = String.format("stage/%s", content.getStageName()); targetUrl = String.format("%s/#/applications/%s/executions/details/%s?pipeline=%s&stage=%d", getSpinnakerUrl(), application, content.getExecutionId(), content.getPipeline(), content.getStageIndex()); } else if (config.get("type").equals("pipeline")) { description = String.format("Pipeline '%s' is %s", content.getPipeline(), status); context = String.format("pipeline/%s", content.getPipeline()); targetUrl = String.format("%s/#/applications/%s/executions/details/%s?pipeline=%s", getSpinnakerUrl(), application, content.getExecutionId(), content.getPipeline()); } else { return; } log.info(String.format("Sending Github status check for application: %s", application)); String branchCommit = getBranchCommit(content.getRepo(), content.getSha()); GithubStatus githubStatus = new GithubStatus(state, targetUrl, description, context); try { final String repo = content.getRepo(); retrySupport.retry( () -> githubService.updateCheck("token " + token, repo, branchCommit, githubStatus), MAX_RETRY, RETRY_BACKOFF, false); } catch (Exception e) { log.error(String.format("Failed to send github status for application: '%s' pipeline: '%s', %s", application, content.getPipeline(), e)); } }