Skip to content

Commit

Permalink
fix: Status message when a label is matched
Browse files Browse the repository at this point in the history
  • Loading branch information
HaydenMeloche authored and gr2m committed Feb 3, 2019
1 parent 3860884 commit 7e73d8e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/pro/set-status.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,20 @@ function setStatusPro (newStatus, context) {
output = `a ${output.name} emoji` // Emoji match
}

let location = locationLabel[newStatus.location]

if (location !== undefined) {
location = location.charAt(0).toUpperCase() + location.slice(1) // Make first letter of word capitalize
}

const checkOptions = {
name: name,
status: 'in_progress',
started_at: new Date(newStatus.timeStart).toISOString(),
head_branch: '', // workaround for https://github.com/octokit/rest.js/issues/874
head_sha: pullRequest.head.sha,
output: {
title: `Title contains ${output}`,
title: `${location} contains ${output}`,
summary: `The ${locationLabel[newStatus.location]} "${newStatus.text}" contains "${newStatus.match}".
You can override the status by adding "@wip ready for review" to the end of the [pull request description](${pullRequest.html_url}#discussion_bucket).`,
Expand Down

0 comments on commit 7e73d8e

Please sign in to comment.