Skip to content

Commit 104ae05

Browse files
committed
fix(jira): update arguments
1 parent e066719 commit 104ae05

File tree

2 files changed

+3
-10
lines changed

2 files changed

+3
-10
lines changed

common/net/Jira.js

+1-8
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,7 @@ class Jira {
2626

2727
async updateField(issueId, data) {
2828
try {
29-
const array = data.split(',');
30-
const parsedData = array.reduce((newData, item) => {
31-
const splitItem = item.split(':');
32-
if (splitItem.length === 2) {
33-
newData[splitItem[0].trim()] = splitItem[1];
34-
}
35-
return newData;
36-
}, {});
29+
const parsedData = JSON.parse(data);
3730
return this.fetch(
3831
"updateField",
3932
{

index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ async function exec () {
2626
return
2727
}
2828

29-
console.log('Failed to comment an issue.')
29+
console.log('Failed to update an issue.')
3030
process.exit(78)
3131
} catch (error) {
3232
console.error(error)
@@ -37,7 +37,7 @@ async function exec () {
3737
function parseArgs () {
3838
return {
3939
issue: core.getInput('issue'),
40-
comment: core.getInput('comment')
40+
fields: core.getInput('fields')
4141
}
4242
}
4343

0 commit comments

Comments
 (0)