Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: octokit/plugin-throttling.js
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v6.1.0
Choose a base ref
...
head repository: octokit/plugin-throttling.js
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v7.0.0
Choose a head ref
  • 7 commits
  • 12 files changed
  • 4 contributors

Commits on Jun 14, 2023

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    8007d99 View commit details

Commits on Jun 16, 2023

  1. chore(deps): update dependency esbuild to ^0.18.0 (#605)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Jun 16, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    c0b2693 View commit details

Commits on Jun 19, 2023

  1. build(deps): lock file maintenance

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Jun 19, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    11f6c1e View commit details

Commits on Jun 20, 2023

  1. chore(deps): update octokit monorepo (major) (#608)

    chore(deps): update octokit monorepo
    
    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Jun 20, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    9b84076 View commit details

Commits on Jul 3, 2023

  1. build(deps): lock file maintenance

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Jul 3, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    3024cc0 View commit details

Commits on Jul 6, 2023

  1. chore(deps): update dependency prettier to v3 (#611)

    * chore(deps): update dependency prettier to v3
    
    * style: prettier
    
    * Empty commit to trigger test run
    
    ---------
    
    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    Co-authored-by: Create or Update Pull Request Action <create-or-update-pull-request@users.noreply.github.com>
    Co-authored-by: Keegan Campbell <me@kfcampbell.com>
    3 people authored Jul 6, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    45eb6e8 View commit details

Commits on Jul 10, 2023

  1. fix(deps): update octokit monorepo (major) (#612)

    BREAKING CHANGE: require `@octokit/core` > 5
    BREAKING CHANGE: bump `@octokit/types` to v11
    
    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Jul 10, 2023
    Copy the full SHA
    a979e93 View commit details
Showing with 1,275 additions and 989 deletions.
  1. +8 −8 README.md
  2. +1,220 −934 package-lock.json
  3. +6 −6 package.json
  4. +2 −2 scripts/build.mjs
  5. +1 −1 scripts/update-endpoints/code.js
  6. +1 −1 scripts/update-endpoints/fetch-json.js
  7. +6 −6 src/index.ts
  8. +1 −1 src/route-matcher.ts
  9. +1 −1 src/types.ts
  10. +1 −1 test/events.test.ts
  11. +26 −26 test/plugin.test.ts
  12. +2 −2 test/retry.test.ts
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -15,12 +15,12 @@ Implements all [recommended best practices](https://docs.github.com/en/rest/guid
Browsers
</th><td width=100%>

Load `@octokit/plugin-throttling` and [`@octokit/core`](https://github.com/octokit/core.js) (or core-compatible module) directly from [cdn.skypack.dev](https://cdn.skypack.dev)
Load `@octokit/plugin-throttling` and [`@octokit/core`](https://github.com/octokit/core.js) (or core-compatible module) directly from [esm.sh](https://esm.sh)

```html
<script type="module">
import { Octokit } from "https://cdn.skypack.dev/@octokit/core";
import { throttling } from "https://cdn.skypack.dev/@octokit/plugin-throttling";
import { Octokit } from "https://esm.sh/@octokit/core";
import { throttling } from "https://esm.sh/@octokit/plugin-throttling";
</script>
```

@@ -54,7 +54,7 @@ const octokit = new MyOctokit({
throttle: {
onRateLimit: (retryAfter, options, octokit, retryCount) => {
octokit.log.warn(
`Request quota exhausted for request ${options.method} ${options.url}`
`Request quota exhausted for request ${options.method} ${options.url}`,
);

if (retryCount < 1) {
@@ -66,24 +66,24 @@ const octokit = new MyOctokit({
onSecondaryRateLimit: (retryAfter, options, octokit) => {
// does not retry, only logs a warning
octokit.log.warn(
`SecondaryRateLimit detected for request ${options.method} ${options.url}`
`SecondaryRateLimit detected for request ${options.method} ${options.url}`,
);
},
},
});

async function createIssueOnAllRepos(org) {
const repos = await octokit.paginate(
octokit.repos.listForOrg.endpoint({ org })
octokit.repos.listForOrg.endpoint({ org }),
);
return Promise.all(
repos.map(({ name }) =>
octokit.issues.create({
owner,
repo: name,
title: "Hello, world!",
})
)
}),
),
);
}
```
Loading