Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit c09747e

Browse filesBrowse files
committed
Merge branch 'main' into update-glob
2 parents 0a99845 + 1005277 commit c09747e
Copy full SHA for c09747e

24 files changed

+5404
-3140
lines changed

‎.licenses/npm/@actions/core.dep.yml

Copy file name to clipboardExpand all lines: .licenses/npm/@actions/core.dep.yml
+1-1Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎.licenses/npm/@actions/github.dep.yml

Copy file name to clipboardExpand all lines: .licenses/npm/@actions/github.dep.yml
+1-1Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎.licenses/npm/@actions/http-client-1.0.11.dep.yml

Copy file name to clipboardExpand all lines: .licenses/npm/@actions/http-client-1.0.11.dep.yml
-32Lines changed: 0 additions & 32 deletions
This file was deleted.

‎.licenses/npm/@actions/http-client-2.0.0.dep.yml

Copy file name to clipboardExpand all lines: .licenses/npm/@actions/http-client-2.0.0.dep.yml
-32Lines changed: 0 additions & 32 deletions
This file was deleted.

‎.licenses/npm/@actions/http-client.dep.yml

Copy file name to clipboardExpand all lines: .licenses/npm/@actions/http-client.dep.yml
+32Lines changed: 32 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎.licenses/npm/@octokit/core.dep.yml

Copy file name to clipboardExpand all lines: .licenses/npm/@octokit/core.dep.yml
+1-1Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎.licenses/npm/@octokit/openapi-types.dep.yml renamed to ‎.licenses/npm/@octokit/openapi-types-12.11.0.dep.yml

Copy file name to clipboardExpand all lines: .licenses/npm/@octokit/openapi-types-12.11.0.dep.yml
+2-2Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎.licenses/npm/@octokit/openapi-types-13.2.0.dep.yml

Copy file name to clipboardExpand all lines: .licenses/npm/@octokit/openapi-types-13.2.0.dep.yml
+20Lines changed: 20 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎.licenses/npm/@octokit/plugin-rest-endpoint-methods-5.16.2.dep.yml

Copy file name to clipboardExpand all lines: .licenses/npm/@octokit/plugin-rest-endpoint-methods-5.16.2.dep.yml
+20Lines changed: 20 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎.licenses/npm/@octokit/plugin-rest-endpoint-methods-6.3.0.dep.yml

Copy file name to clipboardExpand all lines: .licenses/npm/@octokit/plugin-rest-endpoint-methods-6.3.0.dep.yml
+20Lines changed: 20 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎.licenses/npm/@octokit/plugin-retry.dep.yml

Copy file name to clipboardExpand all lines: .licenses/npm/@octokit/plugin-retry.dep.yml
+34Lines changed: 34 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎.licenses/npm/@octokit/request.dep.yml

Copy file name to clipboardExpand all lines: .licenses/npm/@octokit/request.dep.yml
+4-4Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎.licenses/npm/@octokit/types.dep.yml renamed to ‎.licenses/npm/@octokit/types-6.41.0.dep.yml

Copy file name to clipboardExpand all lines: .licenses/npm/@octokit/types-6.41.0.dep.yml
+2-2Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎.licenses/npm/@octokit/plugin-rest-endpoint-methods.dep.yml renamed to ‎.licenses/npm/@octokit/types-7.1.0.dep.yml

Copy file name to clipboardExpand all lines: .licenses/npm/@octokit/types-7.1.0.dep.yml
+3-3Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎.licenses/npm/bottleneck.dep.yml

Copy file name to clipboardExpand all lines: .licenses/npm/bottleneck.dep.yml
+31Lines changed: 31 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎.licenses/npm/uuid.dep.yml

Copy file name to clipboardExpand all lines: .licenses/npm/uuid.dep.yml
+20Lines changed: 20 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎README.md

Copy file name to clipboardExpand all lines: README.md
+46-2Lines changed: 46 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
This action makes it easy to quickly write a script in your workflow that
88
uses the GitHub API and the workflow run context.
99

10-
To use this action, provide an input named `script` that contains the body of an asynchronous function call.
10+
To use this action, provide an input named `script` that contains the body of an asynchronous function call.
1111
The following arguments will be provided:
1212

1313
- `github` A pre-authenticated
@@ -83,6 +83,47 @@ output of a github-script step. For some workflows, string encoding is preferred
8383
script: return "I will be string (not JSON) encoded!"
8484
```
8585

86+
## Retries
87+
88+
By default, requests made with the `github` instance will not be retried. You can configure this with the `retries` option:
89+
90+
```yaml
91+
- uses: actions/github-script@v6
92+
id: my-script
93+
with:
94+
result-encoding: string
95+
retries: 3
96+
script: |
97+
github.rest.issues.get({
98+
issue_number: context.issue.number,
99+
owner: context.repo.owner,
100+
repo: context.repo.repo,
101+
})
102+
```
103+
104+
In this example, request failures from `github.rest.issues.get()` will be retried up to 3 times.
105+
106+
You can also configure which status codes should be exempt from retries via the `retry-exempt-status-codes` option:
107+
108+
```yaml
109+
- uses: actions/github-script@v6
110+
id: my-script
111+
with:
112+
result-encoding: string
113+
retries: 3
114+
retry-exempt-status-codes: 400,401
115+
script: |
116+
github.rest.issues.get({
117+
issue_number: context.issue.number,
118+
owner: context.repo.owner,
119+
repo: context.repo.repo,
120+
})
121+
```
122+
123+
By default, the following status codes will not be retried: `400, 401, 403, 404, 422` [(source)](https://github.com/octokit/plugin-retry.js/blob/9a2443746c350b3beedec35cf26e197ea318a261/src/index.ts#L14).
124+
125+
These retries are implemented using the [octokit/plugin-retry.js](https://github.com/octokit/plugin-retry.js) plugin. The retries use [exponential backoff](https://en.wikipedia.org/wiki/Exponential_backoff) to space out retries. ([source](https://github.com/octokit/plugin-retry.js/blob/9a2443746c350b3beedec35cf26e197ea318a261/src/error-request.ts#L13))
126+
86127
## Examples
87128

88129
Note that `github-token` is optional in this action, and the input is there
@@ -354,8 +395,11 @@ jobs:
354395
To import an ESM file, you'll need to reference your script by an absolute path and ensure you have a `package.json` file with `"type": "module"` specified.
355396
356397
For a script in your repository `src/print-stuff.js`:
398+
357399
```js
358-
export default function printStuff() { console.log('stuff') }
400+
export default function printStuff() {
401+
console.log('stuff')
402+
}
359403
```
360404

361405
```yaml

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.