Skip to content

Commit

Permalink
Updates for GitHub secondary rate limit renaming
Browse files Browse the repository at this point in the history
  • Loading branch information
bflad committed Dec 10, 2021
1 parent 4ad25e0 commit 138cfbb
Show file tree
Hide file tree
Showing 5 changed files with 551 additions and 514 deletions.
6 changes: 3 additions & 3 deletions action.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -313,15 +313,15 @@ ${sourceIssueBody}`,
await expect(scope.isDone()).toBeTruthy();
});

test('retries abuse limit errors', async () => {
test('retries secondary rate limit errors', async () => {
process.env['GITHUB_EVENT_PATH'] = path.join(__dirname, 'issue-labeled-payload.json');
process.env['INPUT_TARGET-REPOSITORY-NAME'] = targetRepoName;

const scope = nock('https://api.github.com')
.post(`/repos/${targetRepo}/issues`, mockIssueOpenedRequest)
.reply(403, {
message: "You have triggered an abuse detection mechanism and have been temporarily blocked from content creation. Please retry your request again later.",
documentation_url: "https://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits"
message: "You have exceeded a secondary rate limit and have been temporarily blocked from content creation. Please retry your request again later.",
documentation_url: "https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits"
})
.post(`/repos/${targetRepo}/issues`, mockIssueOpenedRequest)
.reply(201, mockIssueOpenedResponse)
Expand Down
Loading

0 comments on commit 138cfbb

Please sign in to comment.