Skip to content

Commit

Permalink
fix: no issue detected on webhook
Browse files Browse the repository at this point in the history
  • Loading branch information
Timmatt-Lee committed Sep 2, 2020
1 parent fb2b7be commit 9f623a3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1843,6 +1843,10 @@ async function main() {
// project = key.substring(0, key.indexOf('-'));

if (webhook) {
if (!key) {
core.info('No jira issue detected in PR title/branch');
process.exit(0);
}
await request({ url: webhook, method: 'post', data: { issues: [key], pr } });
await gitService.updatePR({ body: `[${key}](${host}/browse/${key})\n${pr.body}` });
core.info('webhook complete');
Expand Down
4 changes: 4 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ async function main() {
// project = key.substring(0, key.indexOf('-'));

if (webhook) {
if (!key) {
core.info('No jira issue detected in PR title/branch');
process.exit(0);
}
await request({ url: webhook, method: 'post', data: { issues: [key], pr } });
await gitService.updatePR({ body: `[${key}](${host}/browse/${key})\n${pr.body}` });
core.info('webhook complete');
Expand Down

0 comments on commit 9f623a3

Please sign in to comment.