File tree 6 files changed +16
-11
lines changed
6 files changed +16
-11
lines changed Original file line number Diff line number Diff line change 9
9
uses : actions/checkout@v1
10
10
11
11
- name : Comment PR
12
- uses : sbimochan/jira-link-commenter@v2.3
12
+ uses : sbimochan/jira-link-commenter@v2.4
13
13
14
14
with :
15
15
jira-project-url : https://jira.atlassian.net/browse
16
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
16
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
17
+ custom-comment : ' Thank you for your contribution!!! :confetti_ball:'
Original file line number Diff line number Diff line change @@ -19,9 +19,10 @@ Jira Link: https://jira.atlassian.net/browse/JPT-1571
19
19
## Example usage
20
20
21
21
``` yaml
22
- uses : actions/jira-link-commenter@v2.3
22
+ uses : actions/jira-link-commenter@v2.4
23
23
with :
24
24
jira-project-url : ' https://jira.atlassian.net/browse'
25
+ custom-comment : ' Thank you for your contribution! :confetti_ball:'
25
26
` ` `
26
27
27
28
### Full example
@@ -38,11 +39,12 @@ jobs:
38
39
uses : actions/checkout@v1
39
40
40
41
- name : Comment PR
41
- uses : sbimochan/jira-link-commenter@v2.3
42
+ uses : sbimochan/jira-link-commenter@v2.4
42
43
43
44
with :
44
45
jira-project-url : https://jira.atlassian.net/browse
45
46
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
47
+ custom-comment : ' Thank you for your contribution! :confetti_ball:'
46
48
` ` `
47
49
48
50
### Recommendations:
Original file line number Diff line number Diff line change 7
7
GITHUB_TOKEN :
8
8
description : ' Add token'
9
9
required : true
10
+ custom-comment :
11
+ description : ' Add custom comment'
12
+ default : ' Thank you for your contribution! :confetti_ball:'
13
+ required : false
10
14
runs :
11
15
using : ' node16'
12
16
main : ' dist/index.js'
Original file line number Diff line number Diff line change @@ -8449,6 +8449,7 @@ async function runMain() {
8449
8449
try {
8450
8450
const jirProjectUrl = core.getInput('jira-project-url');
8451
8451
const githubToken = core.getInput('GITHUB_TOKEN');
8452
+ const customComment = core.getInput('custom-comment');
8452
8453
8453
8454
const context = github.context;
8454
8455
if (context.payload.pull_request == null) {
@@ -8474,9 +8475,7 @@ async function runMain() {
8474
8475
await octokit.rest.issues.createComment({
8475
8476
...context.repo,
8476
8477
issue_number: pullRequestNumber,
8477
- body: `Thank you for your contribution! :confetti_ball: \n Jira link: ${
8478
- jirProjectUrl + '/' + ticketNumber
8479
- }`
8478
+ body: `${customComment} \n Jira link: ${jirProjectUrl + '/' + ticketNumber}`
8480
8479
});
8481
8480
} catch (error) {
8482
8481
core.setFailed(error.message);
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " jira-link-commenter" ,
3
- "version" : " 2.3 " ,
3
+ "version" : " 2.4 " ,
4
4
"description" : " This action auto comments in pull request with Jira link to it." ,
5
5
"main" : " src/main.js" ,
6
6
"scripts" : {
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ async function runMain() {
5
5
try {
6
6
const jirProjectUrl = core . getInput ( 'jira-project-url' ) ;
7
7
const githubToken = core . getInput ( 'GITHUB_TOKEN' ) ;
8
+ const customComment = core . getInput ( 'custom-comment' ) ;
8
9
9
10
const context = github . context ;
10
11
if ( context . payload . pull_request == null ) {
@@ -30,9 +31,7 @@ async function runMain() {
30
31
await octokit . rest . issues . createComment ( {
31
32
...context . repo ,
32
33
issue_number : pullRequestNumber ,
33
- body : `Thank you for your contribution! :confetti_ball: \n Jira link: ${
34
- jirProjectUrl + '/' + ticketNumber
35
- } `
34
+ body : `${ customComment } \n Jira link: ${ jirProjectUrl + '/' + ticketNumber } `
36
35
} ) ;
37
36
} catch ( error ) {
38
37
core . setFailed ( error . message ) ;
You can’t perform that action at this time.
0 commit comments