Skip to content

Commit ec11bbe

Browse files
committed
✨ Add github-token input to composite actions
1 parent 32d3e60 commit ec11bbe

File tree

24 files changed

+414
-105
lines changed

24 files changed

+414
-105
lines changed

issues/add-assignees/action.yaml

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,31 @@ inputs:
1414
owner:
1515
required: false
1616
default: ""
17-
description: "The repository owner"
17+
description: |
18+
The repository owner.
19+
If unspecified, this will default to the owner of the current repository.
1820
repo:
1921
required: false
2022
default: ""
21-
description: "The repository"
23+
description: |
24+
The name of the repository.
25+
If unspecified, this will default to the current repository.
26+
github-token:
27+
required: false
28+
default: "${{ github.token }}"
29+
description: |
30+
The default token to use for this Git operation.
31+
If unspecified, this will default to `github.token`.
2232
retries:
2333
required: false
2434
default: "0"
25-
description: "The number of times to try retrying"
35+
description: |
36+
The number of times to attempt to retry if this fails.
2637
retry-exempt-status-codes:
2738
required: false
2839
default: "400,401,403,404,422"
29-
description: "The retry exempt status codes"
40+
description: |
41+
A list of error-codes that are exempt from being retried.
3042
3143
runs:
3244
using: "composite"
@@ -36,6 +48,7 @@ runs:
3648
with:
3749
retries: ${{ inputs.retries }}
3850
retry-exempt-status-codes: ${{ inputs.retry-exempt-status-codes }}
51+
github-token: ${{ inputs.github-token }}
3952
script: |
4053
github.rest.issues.addAssignees({
4154
owner: `${{ inputs.owner }}` || context.repo.owner,

issues/add-labels/action.yaml

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,31 @@ inputs:
1414
owner:
1515
required: false
1616
default: ""
17-
description: "The repository owner"
17+
description: |
18+
The repository owner.
19+
If unspecified, this will default to the owner of the current repository.
1820
repo:
1921
required: false
2022
default: ""
21-
description: "The repository"
23+
description: |
24+
The name of the repository.
25+
If unspecified, this will default to the current repository.
26+
github-token:
27+
required: false
28+
default: "${{ github.token }}"
29+
description: |
30+
The default token to use for this Git operation.
31+
If unspecified, this will default to `github.token`.
2232
retries:
2333
required: false
2434
default: "0"
25-
description: "The number of times to try retrying"
35+
description: |
36+
The number of times to attempt to retry if this fails.
2637
retry-exempt-status-codes:
2738
required: false
2839
default: "400,401,403,404,422"
29-
description: "The retry exempt status codes"
40+
description: |
41+
A list of error-codes that are exempt from being retried.
3042
3143
runs:
3244
using: "composite"
@@ -36,6 +48,7 @@ runs:
3648
with:
3749
retries: ${{ inputs.retries }}
3850
retry-exempt-status-codes: ${{ inputs.retry-exempt-status-codes }}
51+
github-token: ${{ inputs.github-token }}
3952
script: |
4053
github.rest.issues.addLabels({
4154
owner: `${{ inputs.owner }}` || context.repo.owner,

issues/close/action.yaml

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,31 @@ inputs:
1515
owner:
1616
required: false
1717
default: ""
18-
description: "The repository owner"
18+
description: |
19+
The repository owner.
20+
If unspecified, this will default to the owner of the current repository.
1921
repo:
2022
required: false
2123
default: ""
22-
description: "The repository"
24+
description: |
25+
The name of the repository.
26+
If unspecified, this will default to the current repository.
27+
github-token:
28+
required: false
29+
default: "${{ github.token }}"
30+
description: |
31+
The default token to use for this Git operation.
32+
If unspecified, this will default to `github.token`.
2333
retries:
2434
required: false
2535
default: "0"
26-
description: "The number of times to try retrying"
36+
description: |
37+
The number of times to attempt to retry if this fails.
2738
retry-exempt-status-codes:
2839
required: false
2940
default: "400,401,403,404,422"
30-
description: "The retry exempt status codes"
41+
description: |
42+
A list of error-codes that are exempt from being retried.
3143
3244
runs:
3345
using: "composite"
@@ -37,6 +49,7 @@ runs:
3749
with:
3850
retries: ${{ inputs.retries }}
3951
retry-exempt-status-codes: ${{ inputs.retry-exempt-status-codes }}
52+
github-token: ${{ inputs.github-token }}
4053
script: |
4154
github.rest.issues.update({
4255
owner: `${{ inputs.owner }}` || context.repo.owner,

issues/create-comment/action.yaml

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,31 @@ inputs:
1414
owner:
1515
required: false
1616
default: ""
17-
description: "The repository owner"
17+
description: |
18+
The repository owner.
19+
If unspecified, this will default to the owner of the current repository.
1820
repo:
1921
required: false
2022
default: ""
21-
description: "The repository"
23+
description: |
24+
The name of the repository.
25+
If unspecified, this will default to the current repository.
26+
github-token:
27+
required: false
28+
default: "${{ github.token }}"
29+
description: |
30+
The default token to use for this Git operation.
31+
If unspecified, this will default to `github.token`.
2232
retries:
2333
required: false
2434
default: "0"
25-
description: "The number of times to try retrying"
35+
description: |
36+
The number of times to attempt to retry if this fails.
2637
retry-exempt-status-codes:
2738
required: false
2839
default: "400,401,403,404,422"
29-
description: "The retry exempt status codes"
40+
description: |
41+
A list of error-codes that are exempt from being retried.
3042
outputs:
3143
comment-id:
3244
value: ${{ steps.create-comment.outputs.comment-id }}
@@ -47,6 +59,7 @@ runs:
4759
with:
4860
retries: ${{ inputs.retries }}
4961
retry-exempt-status-codes: ${{ inputs.retry-exempt-status-codes }}
62+
github-token: ${{ inputs.github-token }}
5063
script: |
5164
const { data: comment } = await github.rest.issues.createComment({
5265
issue_number: ${{ inputs.issue-number }} || context.issue.number,

issues/create-or-comment/action.yaml

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,19 +27,32 @@ inputs:
2727
owner:
2828
required: false
2929
default: ""
30-
description: "The repository owner"
30+
description: |
31+
The repository owner.
32+
If unspecified, this will default to the owner of the current repository.
3133
repo:
3234
required: false
3335
default: ""
34-
description: "The repository"
36+
description: |
37+
The name of the repository.
38+
If unspecified, this will default to the current repository.
39+
github-token:
40+
required: false
41+
default: "${{ github.token }}"
42+
description: |
43+
The default token to use for this Git operation.
44+
If unspecified, this will default to `github.token`.
3545
retries:
3646
required: false
37-
default: "3"
38-
description: "The number of times to try retrying"
47+
default: "0"
48+
description: |
49+
The number of times to attempt to retry if this fails.
3950
retry-exempt-status-codes:
4051
required: false
4152
default: "400,401,403,404,422"
42-
description: "The retry exempt status codes"
53+
description: |
54+
A list of error-codes that are exempt from being retried.
55+
4356
outputs:
4457
issue-number:
4558
value: ${{ steps.create-or-comment.outputs.issue-number }}
@@ -60,6 +73,7 @@ runs:
6073
with:
6174
retries: ${{ inputs.retries }}
6275
retry-exempt-status-codes: ${{ inputs.retry-exempt-status-codes }}
76+
github-token: ${{ inputs.github-token }}
6377
script: |
6478
const issues = await github.paginate(github.rest.issues.listForRepo, {
6579
owner: `${{ inputs.owner }}` || context.repo.owner,

issues/create/action.yaml

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,19 +22,31 @@ inputs:
2222
owner:
2323
required: false
2424
default: ""
25-
description: "The repository owner"
25+
description: |
26+
The repository owner.
27+
If unspecified, this will default to the owner of the current repository.
2628
repo:
2729
required: false
2830
default: ""
29-
description: "The repository"
31+
description: |
32+
The name of the repository.
33+
If unspecified, this will default to the current repository.
34+
github-token:
35+
required: false
36+
default: "${{ github.token }}"
37+
description: |
38+
The default token to use for this Git operation.
39+
If unspecified, this will default to `github.token`.
3040
retries:
3141
required: false
32-
default: "3"
33-
description: "The number of times to try retrying"
42+
default: "0"
43+
description: |
44+
The number of times to attempt to retry if this fails.
3445
retry-exempt-status-codes:
3546
required: false
3647
default: "400,401,403,404,422"
37-
description: "The retry exempt status codes"
48+
description: |
49+
A list of error-codes that are exempt from being retried.
3850
outputs:
3951
issue-number:
4052
value: ${{ steps.create.outputs.issue-number }}
@@ -52,6 +64,7 @@ runs:
5264
with:
5365
retries: ${{ inputs.retries }}
5466
retry-exempt-status-codes: ${{ inputs.retry-exempt-status-codes }}
67+
github-token: ${{ inputs.github-token }}
5568
script: |
5669
const { data: issue } = await github.rest.issues.create({
5770
owner: `${{ inputs.owner }}` || context.repo.owner,

issues/delete-comment/action.yaml

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,31 @@ inputs:
1010
owner:
1111
required: false
1212
default: ""
13-
description: "The repository owner"
13+
description: |
14+
The repository owner.
15+
If unspecified, this will default to the owner of the current repository.
1416
repo:
1517
required: false
1618
default: ""
17-
description: "The repository"
19+
description: |
20+
The name of the repository.
21+
If unspecified, this will default to the current repository.
22+
github-token:
23+
required: false
24+
default: "${{ github.token }}"
25+
description: |
26+
The default token to use for this Git operation.
27+
If unspecified, this will default to `github.token`.
1828
retries:
1929
required: false
2030
default: "0"
21-
description: "The number of times to try retrying"
31+
description: |
32+
The number of times to attempt to retry if this fails.
2233
retry-exempt-status-codes:
2334
required: false
2435
default: "400,401,403,404,422"
25-
description: "The retry exempt status codes"
36+
description: |
37+
A list of error-codes that are exempt from being retried.
2638
2739
runs:
2840
using: "composite"
@@ -33,6 +45,7 @@ runs:
3345
with:
3446
retries: ${{ inputs.retries }}
3547
retry-exempt-status-codes: ${{ inputs.retry-exempt-status-codes }}
48+
github-token: ${{ inputs.github-token }}
3649
script: |
3750
github.rest.issues.deleteComment({
3851
owner: `${{ inputs.owner }}` || context.repo.owner,

issues/get/action.yaml

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,31 @@ inputs:
1111
owner:
1212
required: false
1313
default: ""
14-
description: "The repository owner"
14+
description: |
15+
The repository owner.
16+
If unspecified, this will default to the owner of the current repository.
1517
repo:
1618
required: false
1719
default: ""
18-
description: "The repository"
20+
description: |
21+
The name of the repository.
22+
If unspecified, this will default to the current repository.
23+
github-token:
24+
required: false
25+
default: "${{ github.token }}"
26+
description: |
27+
The default token to use for this Git operation.
28+
If unspecified, this will default to `github.token`.
1929
retries:
2030
required: false
21-
default: "3"
22-
description: "The number of times to try retrying"
31+
default: "0"
32+
description: |
33+
The number of times to attempt to retry if this fails.
2334
retry-exempt-status-codes:
2435
required: false
2536
default: "400,401,403,404,422"
26-
description: "The retry exempt status codes"
37+
description: |
38+
A list of error-codes that are exempt from being retried.
2739
outputs:
2840
issue-number:
2941
value: ${{ steps.get-issue.outputs.issue-number }}
@@ -71,6 +83,7 @@ runs:
7183
with:
7284
retries: ${{ inputs.retries }}
7385
retry-exempt-status-codes: ${{ inputs.retry-exempt-status-codes }}
86+
github-token: ${{ inputs.github-token }}
7487
script: |
7588
const { data: issue } = await github.rest.issues.get({
7689
owner: `${{ inputs.owner }}` || context.repo.owner,

0 commit comments

Comments
 (0)