Skip to content

Commit 2984201

Browse files
committed
opt-colon: Bump version and build
1 parent 8456702 commit 2984201

File tree

3 files changed

+21
-14
lines changed

3 files changed

+21
-14
lines changed

dist/index.js

+19-12
Original file line numberDiff line numberDiff line change
@@ -9436,7 +9436,7 @@ function grabTicket(title, ticketRegex) {
94369436
return ticketId;
94379437
}
94389438

9439-
module.exports = { grabTicket, DEFAULT_TICKET_REGEX }
9439+
module.exports = { grabTicket, DEFAULT_TICKET_REGEX };
94409440

94419441

94429442
/***/ }),
@@ -9624,15 +9624,17 @@ const { grabTicket, DEFAULT_TICKET_REGEX } = __nccwpck_require__(5574);
96249624

96259625
async function runMain() {
96269626
try {
9627-
const jirProjectUrl = core.getInput('jira-project-url');
9628-
const githubToken = core.getInput('GITHUB_TOKEN');
9629-
const customComment = core.getInput('custom-comment');
9630-
const ticketRegexRaw = core.getInput('ticket-regex-title')
9631-
const ticketRegex = ticketRegexRaw ? new RegExp(ticketRegexRaw, 'g') : DEFAULT_TICKET_REGEX;
9627+
const jirProjectUrl = core.getInput("jira-project-url");
9628+
const githubToken = core.getInput("GITHUB_TOKEN");
9629+
const customComment = core.getInput("custom-comment");
9630+
const ticketRegexRaw = core.getInput("ticket-regex-title");
9631+
const ticketRegex = ticketRegexRaw
9632+
? new RegExp(ticketRegexRaw, "g")
9633+
: DEFAULT_TICKET_REGEX;
96329634

96339635
const context = github.context;
96349636
if (context.payload.pull_request == null) {
9635-
core.setFailed('No pull request found.');
9637+
core.setFailed("No pull request found.");
96369638

96379639
return;
96389640
}
@@ -9644,17 +9646,22 @@ async function runMain() {
96449646
pullRequestNumber
96459647
);
96469648
if (isPrevComment) {
9647-
console.log('Jira link bot comment already exists.');
9649+
console.log("Jira link bot comment already exists.");
96489650
return;
96499651
}
9650-
const ticketNumber = grabTicket(context.payload.pull_request.title, ticketRegex);
9652+
const ticketNumber = grabTicket(
9653+
context.payload.pull_request.title,
9654+
ticketRegex
9655+
);
96519656
if (!ticketNumber) {
96529657
return;
96539658
}
96549659
await octokit.rest.issues.createComment({
96559660
...context.repo,
96569661
issue_number: pullRequestNumber,
9657-
body: `${customComment} \n Jira link: ${jirProjectUrl + '/' + ticketNumber}`
9662+
body: `${customComment} \n Jira link: ${
9663+
jirProjectUrl + "/" + ticketNumber
9664+
}`,
96589665
});
96599666
} catch (error) {
96609667
core.setFailed(error.message);
@@ -9664,10 +9671,10 @@ async function runMain() {
96649671
async function checkIfOldCommentExists(octokit, context, pullRequestNumber) {
96659672
const commentsMeta = await octokit.rest.issues.listComments({
96669673
...context.repo,
9667-
issue_number: pullRequestNumber
9674+
issue_number: pullRequestNumber,
96689675
});
96699676
const isPrevComment = commentsMeta.data.some(
9670-
(el) => el.user.login === 'github-actions[bot]'
9677+
(el) => el.user.login === "github-actions[bot]"
96719678
);
96729679
return isPrevComment;
96739680
}

package-lock.json

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "jira-link-commenter",
3-
"version": "3.1",
3+
"version": "3.2",
44
"description": "This action auto comments in pull request with Jira link to it.",
55
"main": "src/main.js",
66
"scripts": {

0 commit comments

Comments
 (0)