Skip to content

Commit 52fc245

Browse files
committed
update jira status script
1 parent 02f2571 commit 52fc245

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

update_jira/index.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@ const Jira = require('./../utils/jira')
44

55
run()
66

7+
const statusMap = {
8+
'master': 'Deployed to Production',
9+
'main': 'Deployed to Production',
10+
'staging': 'Deployed to Staging',
11+
'dev': 'Deployed to Staging'
12+
}
13+
714
async function run() {
815
try {
916
const {
@@ -121,13 +128,6 @@ async function handlePushEvent(branch, jiraUtil, githubRepository, githubToken)
121128
})
122129

123130
const { commit: { message: commitMessage } } = data
124-
const statusMap = {
125-
'master': 'Deployed to Production',
126-
'main': 'Deployed to Production',
127-
'staging': 'Deployed to Staging',
128-
'dev': 'Deployed to Staging'
129-
}
130-
131131
const newStatus = statusMap[branch]
132132
if (!newStatus) {
133133
console.log(`No status mapping for branch: ${branch}`)

0 commit comments

Comments
 (0)