Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

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

Sign up
Appearance settings

Add the ability to have a delay before retrying#355

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
mauriziovitale wants to merge2 commits intoactions:main
base:main
Choose a base branch
Loading
frommauriziovitale:ability-to-retry-with-delay
Open
Show file tree
Hide file tree
Changes from1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
PrevPrevious commit
Override the retryAfterBaseValue
  • Loading branch information
@mauriziovitale
mauriziovitale committedMar 28, 2023
commit2ca00a18c2a3077e1b10405825687e40bcec2036
13 changes: 13 additions & 0 deletions.github/workflows/integration.yml
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -57,3 +57,16 @@ jobs:
if [[ "${{steps.output-set.outputs.result}}" != "@actions/core" ]]; then
exit 1
fi

test-retry-after:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Test retry with after
uses: ./
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
retries: 3
retry-after: 999
script: |
console.log('Exec the plugin', context.repo.owner);
4 changes: 3 additions & 1 deletion.gitignore
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
/node_modules/
!/.vscode/
!/.vscode/
.DS_Store
.env
6 changes: 3 additions & 3 deletionssrc/retry-options.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -5,7 +5,7 @@ import { RequestRequestOptions } from '@octokit/types'
export type RetryOptions = {
doNotRetry?: number[]
enabled?: boolean
delay?: number
retryAfterBaseValue?: number
}

export function getRetryOptions(
Expand All@@ -23,7 +23,7 @@ export function getRetryOptions(
}

if (retryAfter > 0) {
retryOptions.delay = retryAfter
retryOptions.retryAfterBaseValue = retryAfter
}

if (exemptStatusCodes.length > 0) {
Expand All@@ -40,7 +40,7 @@ export function getRetryOptions(

core.debug(
`GitHub client configured with: (retries: ${requestOptions.retries
},retryAfter: ${retryOptions.delay ?? 'octokit default: 1000'
},retryAfterBaseValue: ${retryOptions.retryAfterBaseValue ?? 'octokit default: 1000'
} retry-exempt-status-code: ${retryOptions?.doNotRetry ?? 'octokit default: [400, 401, 403, 404, 422]'
})`
)
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp