Compare commits

..

7 Commits

Author SHA1 Message Date
semantic-release-bot
46e4a501e1 build(release): 1.6.1 [skip ci]
## [1.6.1](https://github.com/actions/create-github-app-token/compare/v1.6.0...v1.6.1) (2023-12-01)

### Bug Fixes

* **deps:** bump dependencies([#84](https://github.com/actions/create-github-app-token/issues/84)) ([474769d](474769db88)), closes [#651](https://github.com/actions/create-github-app-token/issues/651) [#648](https://github.com/actions/create-github-app-token/issues/648) [#649](https://github.com/actions/create-github-app-token/issues/649) [#651](https://github.com/actions/create-github-app-token/issues/651) [#648](https://github.com/actions/create-github-app-token/issues/648) [#646](https://github.com/actions/create-github-app-token/issues/646)
2023-12-01 18:27:42 +00:00
dependabot[bot]
2e5cc74af2 build(deps-dev): bump the development-dependencies group with 3 updates (#85)
Bumps the development-dependencies group with 3 updates:
[esbuild](https://github.com/evanw/esbuild),
[undici](https://github.com/nodejs/undici) and
[yaml](https://github.com/eemeli/yaml).

Updates `esbuild` from 0.19.5 to 0.19.8
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/evanw/esbuild/releases">esbuild's
releases</a>.</em></p>
<blockquote>
<h2>v0.19.8</h2>
<ul>
<li>
<p>Add a treemap chart to esbuild's bundle analyzer (<a
href="https://redirect.github.com/evanw/esbuild/issues/2848">#2848</a>)</p>
<p>The bundler analyzer on esbuild's website (<a
href="https://esbuild.github.io/analyze/">https://esbuild.github.io/analyze/</a>)
now has a treemap chart type in addition to the two existing chart types
(sunburst and flame). This should be more familiar for people coming
from other similar tools, as well as make better use of large
screens.</p>
</li>
<li>
<p>Allow decorators after the <code>export</code> keyword (<a
href="https://redirect.github.com/evanw/esbuild/issues/104">#104</a>)</p>
<p>Previously esbuild's decorator parser followed the original behavior
of TypeScript's experimental decorators feature, which only allowed
decorators to come before the <code>export</code> keyword. However, the
upcoming JavaScript decorators feature also allows decorators to come
after the <code>export</code> keyword. And with TypeScript 5.0,
TypeScript now also allows experimental decorators to come after the
<code>export</code> keyword too. So esbuild now allows this as well:</p>
<pre lang="js"><code>// This old syntax has always been permitted:
@decorator export class Foo {}
@decorator export default class Foo {}
<p>// This new syntax is now permitted too:
export <a
href="https://github.com/decorator"><code>@​decorator</code></a> class
Foo {}
export default <a
href="https://github.com/decorator"><code>@​decorator</code></a> class
Foo {}
</code></pre></p>
<p>In addition, esbuild's decorator parser has been rewritten to fix
several subtle and likely unimportant edge cases with esbuild's parsing
of exports and decorators in TypeScript (e.g. TypeScript apparently does
automatic semicolon insertion after <code>interface</code> and
<code>export interface</code> but not after <code>export default
interface</code>).</p>
</li>
<li>
<p>Pretty-print decorators using the same whitespace as the original</p>
<p>When printing code containing decorators, esbuild will now try to
respect whether the original code contained newlines after the decorator
or not. This can make generated code containing many decorators much
more compact to read:</p>
<pre lang="js"><code>// Original code
class Foo {
  @a @b @c abc
  @x @y @z xyz
}
<p>// Old output
class Foo {
<a href="https://github.com/a"><code>@​a</code></a>
<a href="https://github.com/b"><code>@​b</code></a>
<a href="https://github.com/c"><code>@​c</code></a>
abc;
<a href="https://github.com/x"><code>@​x</code></a>
<a href="https://github.com/y"><code>@​y</code></a>
<a href="https://github.com/z"><code>@​z</code></a>
xyz;
}</p>
<p>// New output
class Foo {
<a href="https://github.com/a"><code>@​a</code></a> <a
href="https://github.com/b"><code>@​b</code></a> <a
href="https://github.com/c"><code>@​c</code></a> abc;
<a href="https://github.com/x"><code>@​x</code></a> <a
href="https://github.com/y"><code>@​y</code></a> <a
href="https://github.com/z"><code>@​z</code></a> xyz;
}
</code></pre></p>
</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/evanw/esbuild/blob/main/CHANGELOG.md">esbuild's
changelog</a>.</em></p>
<blockquote>
<h2>0.19.8</h2>
<ul>
<li>
<p>Add a treemap chart to esbuild's bundle analyzer (<a
href="https://redirect.github.com/evanw/esbuild/issues/2848">#2848</a>)</p>
<p>The bundler analyzer on esbuild's website (<a
href="https://esbuild.github.io/analyze/">https://esbuild.github.io/analyze/</a>)
now has a treemap chart type in addition to the two existing chart types
(sunburst and flame). This should be more familiar for people coming
from other similar tools, as well as make better use of large
screens.</p>
</li>
<li>
<p>Allow decorators after the <code>export</code> keyword (<a
href="https://redirect.github.com/evanw/esbuild/issues/104">#104</a>)</p>
<p>Previously esbuild's decorator parser followed the original behavior
of TypeScript's experimental decorators feature, which only allowed
decorators to come before the <code>export</code> keyword. However, the
upcoming JavaScript decorators feature also allows decorators to come
after the <code>export</code> keyword. And with TypeScript 5.0,
TypeScript now also allows experimental decorators to come after the
<code>export</code> keyword too. So esbuild now allows this as well:</p>
<pre lang="js"><code>// This old syntax has always been permitted:
@decorator export class Foo {}
@decorator export default class Foo {}
<p>// This new syntax is now permitted too:
export <a
href="https://github.com/decorator"><code>@​decorator</code></a> class
Foo {}
export default <a
href="https://github.com/decorator"><code>@​decorator</code></a> class
Foo {}
</code></pre></p>
<p>In addition, esbuild's decorator parser has been rewritten to fix
several subtle and likely unimportant edge cases with esbuild's parsing
of exports and decorators in TypeScript (e.g. TypeScript apparently does
automatic semicolon insertion after <code>interface</code> and
<code>export interface</code> but not after <code>export default
interface</code>).</p>
</li>
<li>
<p>Pretty-print decorators using the same whitespace as the original</p>
<p>When printing code containing decorators, esbuild will now try to
respect whether the original code contained newlines after the decorator
or not. This can make generated code containing many decorators much
more compact to read:</p>
<pre lang="js"><code>// Original code
class Foo {
  @a @b @c abc
  @x @y @z xyz
}
<p>// Old output
class Foo {
<a href="https://github.com/a"><code>@​a</code></a>
<a href="https://github.com/b"><code>@​b</code></a>
<a href="https://github.com/c"><code>@​c</code></a>
abc;
<a href="https://github.com/x"><code>@​x</code></a>
<a href="https://github.com/y"><code>@​y</code></a>
<a href="https://github.com/z"><code>@​z</code></a>
xyz;
}</p>
<p>// New output
class Foo {
<a href="https://github.com/a"><code>@​a</code></a> <a
href="https://github.com/b"><code>@​b</code></a> <a
href="https://github.com/c"><code>@​c</code></a> abc;
<a href="https://github.com/x"><code>@​x</code></a> <a
href="https://github.com/y"><code>@​y</code></a> <a
href="https://github.com/z"><code>@​z</code></a> xyz;
}
</code></pre></p>
</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="e97bd6706c"><code>e97bd67</code></a>
publish 0.19.8 to npm</li>
<li><a
href="65b305894d"><code>65b3058</code></a>
mention the treemap in the release notes (<a
href="https://redirect.github.com/evanw/esbuild/issues/2848">#2848</a>)</li>
<li><a
href="16883d42eb"><code>16883d4</code></a>
add whitespace change to release notes</li>
<li><a
href="7383d0dbff"><code>7383d0d</code></a>
decorators: printing preserves newline-tail status</li>
<li><a
href="7edc83da67"><code>7edc83d</code></a>
reword an experimental decorators error message</li>
<li><a
href="f3d535262e"><code>f3d5352</code></a>
remove a now-unused field</li>
<li><a
href="e7551893c0"><code>e755189</code></a>
ts: forbid regular decorators on <code>declare</code> fields</li>
<li><a
href="69c9e7f9fa"><code>69c9e7f</code></a>
allow decorators to come after <code>export</code> (<a
href="https://redirect.github.com/evanw/esbuild/issues/104">#104</a>)</li>
<li><a
href="7baefdb4ea"><code>7baefdb</code></a>
fix a panic with &quot;export default interface\n&quot;</li>
<li><a
href="a8313d2c5d"><code>a8313d2</code></a>
use &quot;check&quot; for decorator validation, not
&quot;guess&quot;</li>
<li>Additional commits viewable in <a
href="https://github.com/evanw/esbuild/compare/v0.19.5...v0.19.8">compare
view</a></li>
</ul>
</details>
<br />

Updates `undici` from 5.27.0 to 5.28.2
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/nodejs/undici/releases">undici's
releases</a>.</em></p>
<blockquote>
<h2>v5.28.2</h2>
<h2>What's Changed</h2>
<ul>
<li>fix: remove optional chainning for compatible with Nodejs12 and
below by <a href="https://github.com/bugb"><code>@​bugb</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/2470">nodejs/undici#2470</a></li>
<li>fix: remove <code>node:</code> prefix by <a
href="https://github.com/tsctx"><code>@​tsctx</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/2471">nodejs/undici#2471</a></li>
<li>perf: avoid Headers initialization by <a
href="https://github.com/tsctx"><code>@​tsctx</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/2468">nodejs/undici#2468</a></li>
<li>fix: handle SharedArrayBuffer correctly by <a
href="https://github.com/tsctx"><code>@​tsctx</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/2466">nodejs/undici#2466</a></li>
<li>fix: Add <code>null</code> type to <code>signal</code> in
<code>RequestInit</code> by <a
href="https://github.com/gebsh"><code>@​gebsh</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/2455">nodejs/undici#2455</a></li>
<li>fix: correctly handle data URL with hashes. by <a
href="https://github.com/tsctx"><code>@​tsctx</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/2475">nodejs/undici#2475</a></li>
<li>fix: check response for timinginfo allow flag by <a
href="https://github.com/ToshB"><code>@​ToshB</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/2477">nodejs/undici#2477</a></li>
<li>Make call to onBodySent conditional in RetryHandler by <a
href="https://github.com/MzUgM"><code>@​MzUgM</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/2478">nodejs/undici#2478</a></li>
<li>refactor: better integrity check by <a
href="https://github.com/tsctx"><code>@​tsctx</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/2462">nodejs/undici#2462</a></li>
<li>fix: Added support for inline URL username:password proxy auth by <a
href="https://github.com/matt-way"><code>@​matt-way</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/2473">nodejs/undici#2473</a></li>
<li>build(deps-dev): bump jsdom from 22.1.0 to 23.0.0 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/2472">nodejs/undici#2472</a></li>
<li>build(deps-dev): bump sinon from 16.1.3 to 17.0.1 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/2405">nodejs/undici#2405</a></li>
<li>build(deps): bump ossf/scorecard-action from 2.2.0 to 2.3.1 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/2396">nodejs/undici#2396</a></li>
<li>build(deps): bump actions/setup-node from 3.8.1 to 4.0.0 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/2395">nodejs/undici#2395</a></li>
<li>build(deps): bump step-security/harden-runner from 2.5.0 to 2.6.0 by
<a href="https://github.com/dependabot"><code>@​dependabot</code></a> in
<a
href="https://redirect.github.com/nodejs/undici/pull/2392">nodejs/undici#2392</a></li>
<li>build(deps-dev): bump formdata-node from 4.4.1 to 6.0.3 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/2389">nodejs/undici#2389</a></li>
<li>build(deps): bump actions/upload-artifact from 3.1.2 to 3.1.3 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/2302">nodejs/undici#2302</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/bugb"><code>@​bugb</code></a> made their
first contribution in <a
href="https://redirect.github.com/nodejs/undici/pull/2470">nodejs/undici#2470</a></li>
<li><a href="https://github.com/gebsh"><code>@​gebsh</code></a> made
their first contribution in <a
href="https://redirect.github.com/nodejs/undici/pull/2455">nodejs/undici#2455</a></li>
<li><a href="https://github.com/ToshB"><code>@​ToshB</code></a> made
their first contribution in <a
href="https://redirect.github.com/nodejs/undici/pull/2477">nodejs/undici#2477</a></li>
<li><a href="https://github.com/MzUgM"><code>@​MzUgM</code></a> made
their first contribution in <a
href="https://redirect.github.com/nodejs/undici/pull/2478">nodejs/undici#2478</a></li>
<li><a href="https://github.com/matt-way"><code>@​matt-way</code></a>
made their first contribution in <a
href="https://redirect.github.com/nodejs/undici/pull/2473">nodejs/undici#2473</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/nodejs/undici/compare/v5.28.1...v5.28.2">https://github.com/nodejs/undici/compare/v5.28.1...v5.28.2</a></p>
<h2>v5.28.1</h2>
<h2>What's Changed</h2>
<ul>
<li>perf: Improve <code>normalizeMethod</code> by <a
href="https://github.com/tsctx"><code>@​tsctx</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/2456">nodejs/undici#2456</a></li>
<li>fix: dispatch error handling by <a
href="https://github.com/ronag"><code>@​ronag</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/2459">nodejs/undici#2459</a></li>
<li>perf(request): optimize if headers are given by <a
href="https://github.com/tsctx"><code>@​tsctx</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/2454">nodejs/undici#2454</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/nodejs/undici/compare/v5.28.0...v5.28.1">https://github.com/nodejs/undici/compare/v5.28.0...v5.28.1</a></p>
<h2>v5.28.0</h2>
<h2>What's Changed</h2>
<ul>
<li>fix(parseHeaders): util.parseHeaders handle correctly array of
buffer… by <a
href="https://github.com/mdoria12"><code>@​mdoria12</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/2398">nodejs/undici#2398</a></li>
<li>docs: add license to undici-types by <a
href="https://github.com/dancastillo"><code>@​dancastillo</code></a> in
<a
href="https://redirect.github.com/nodejs/undici/pull/2401">nodejs/undici#2401</a></li>
<li>perf: optimize Readable.dump by <a
href="https://github.com/ronag"><code>@​ronag</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/2402">nodejs/undici#2402</a></li>
<li>perf(headers): Improve Headers by <a
href="https://github.com/tsctx"><code>@​tsctx</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/2397">nodejs/undici#2397</a></li>
<li>test: re-enable conditional WPT Report for websockets by <a
href="https://github.com/panva"><code>@​panva</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/2407">nodejs/undici#2407</a></li>
<li>fix: delay abort on 'close' by <a
href="https://github.com/ronag"><code>@​ronag</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/2408">nodejs/undici#2408</a></li>
<li>refactor: use <code>substring</code> instead of <code>substr</code>
by <a href="https://github.com/tsctx"><code>@​tsctx</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/2411">nodejs/undici#2411</a></li>
<li>add additional http2 test with fetch by <a
href="https://github.com/KhafraDev"><code>@​KhafraDev</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/2419">nodejs/undici#2419</a></li>
<li>fix: HTTPToken check by <a
href="https://github.com/tsctx"><code>@​tsctx</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/2410">nodejs/undici#2410</a></li>
<li>perf: optimize HeadersList.get by <a
href="https://github.com/tsctx"><code>@​tsctx</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/2420">nodejs/undici#2420</a></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="9a14e5f32a"><code>9a14e5f</code></a>
Bumped v5.28.2</li>
<li><a
href="fcdfe878d7"><code>fcdfe87</code></a>
build(deps): bump actions/upload-artifact from 3.1.2 to 3.1.3 (<a
href="https://redirect.github.com/nodejs/undici/issues/2302">#2302</a>)</li>
<li><a
href="169c157f9a"><code>169c157</code></a>
build(deps-dev): bump formdata-node from 4.4.1 to 6.0.3 (<a
href="https://redirect.github.com/nodejs/undici/issues/2389">#2389</a>)</li>
<li><a
href="97881779e6"><code>9788177</code></a>
build(deps): bump step-security/harden-runner from 2.5.0 to 2.6.0 (<a
href="https://redirect.github.com/nodejs/undici/issues/2392">#2392</a>)</li>
<li><a
href="1f6d159764"><code>1f6d159</code></a>
build(deps): bump actions/setup-node from 3.8.1 to 4.0.0 (<a
href="https://redirect.github.com/nodejs/undici/issues/2395">#2395</a>)</li>
<li><a
href="a393a86d09"><code>a393a86</code></a>
build(deps): bump ossf/scorecard-action from 2.2.0 to 2.3.1 (<a
href="https://redirect.github.com/nodejs/undici/issues/2396">#2396</a>)</li>
<li><a
href="ea2f606e6b"><code>ea2f606</code></a>
build(deps-dev): bump sinon from 16.1.3 to 17.0.1 (<a
href="https://redirect.github.com/nodejs/undici/issues/2405">#2405</a>)</li>
<li><a
href="80979edc78"><code>80979ed</code></a>
build(deps-dev): bump jsdom from 22.1.0 to 23.0.0 (<a
href="https://redirect.github.com/nodejs/undici/issues/2472">#2472</a>)</li>
<li><a
href="08183ea1d2"><code>08183ea</code></a>
fix: Added support for inline URL username:password proxy auth (<a
href="https://redirect.github.com/nodejs/undici/issues/2473">#2473</a>)</li>
<li><a
href="28759f406f"><code>28759f4</code></a>
refactor: better integrity check (<a
href="https://redirect.github.com/nodejs/undici/issues/2462">#2462</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/nodejs/undici/compare/v5.27.0...v5.28.2">compare
view</a></li>
</ul>
</details>
<br />

Updates `yaml` from 2.3.3 to 2.3.4
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/eemeli/yaml/releases">yaml's
releases</a>.</em></p>
<blockquote>
<h2>v2.3.4</h2>
<ul>
<li>Do not throw for carriage return in tag shorthand (<a
href="https://redirect.github.com/eemeli/yaml/issues/501">#501</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="b7696fc001"><code>b7696fc</code></a>
2.3.4</li>
<li><a
href="4af74194f5"><code>4af7419</code></a>
fix: Carriage return in tag shorthand (<a
href="https://redirect.github.com/eemeli/yaml/issues/501">#501</a>)</li>
<li>See full diff in <a
href="https://github.com/eemeli/yaml/compare/v2.3.3...v2.3.4">compare
view</a></li>
</ul>
</details>
<br />


Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's major version (unless you unignore this specific
dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's minor version (unless you unignore this specific
dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR
and stop Dependabot creating any more for the specific dependency
(unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore
conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will
remove the ignore condition of the specified dependency and ignore
conditions


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-01 10:27:09 -08:00
dependabot[bot]
474769db88 fix(deps): bump dependencies(#84)
Bumps the production-dependencies group with 1 update:
[@octokit/request](https://github.com/octokit/request.js).

Updates `@octokit/request` from 8.1.4 to 8.1.6
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/octokit/request.js/releases"><code>@​octokit/request</code>'s
releases</a>.</em></p>
<blockquote>
<h2>v8.1.6</h2>
<h2><a
href="https://github.com/octokit/request.js/compare/v8.1.5...v8.1.6">8.1.6</a>
(2023-11-22)</h2>
<h3>Bug Fixes</h3>
<ul>
<li>integrate isPlainObject (<a
href="https://redirect.github.com/octokit/request.js/issues/651">#651</a>)
(<a
href="2554219c5b">2554219</a>)</li>
</ul>
<h2>v8.1.5</h2>
<h2><a
href="https://github.com/octokit/request.js/compare/v8.1.4...v8.1.5">8.1.5</a>
(2023-11-09)</h2>
<h3>Bug Fixes</h3>
<ul>
<li>avoid <code>Unexpected end of JSON input</code> when response body
is empty (<a
href="https://redirect.github.com/octokit/request.js/issues/648">#648</a>)
(<a
href="819cc3fe0e">819cc3f</a>),
closes <a
href="https://redirect.github.com/octokit/request.js/issues/649">#649</a></li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="2554219c5b"><code>2554219</code></a>
fix: integrate isPlainObject (<a
href="https://redirect.github.com/octokit/request.js/issues/651">#651</a>)</li>
<li><a
href="e5d3577630"><code>e5d3577</code></a>
chore(deps): update dependency prettier to v3.1.0</li>
<li><a
href="819cc3fe0e"><code>819cc3f</code></a>
fix: avoid <code>Unexpected end of JSON input</code> when response body
is empty (<a
href="https://redirect.github.com/octokit/request.js/issues/648">#648</a>)</li>
<li><a
href="5c1fcdfa07"><code>5c1fcdf</code></a>
chore(deps): update dependency <code>@​types/node</code> to v20</li>
<li><a
href="9cb39bac4f"><code>9cb39ba</code></a>
ci(action): update actions/setup-node action to v4 (<a
href="https://redirect.github.com/octokit/request.js/issues/646">#646</a>)</li>
<li><a
href="60ed27a678"><code>60ed27a</code></a>
build(deps-dev): bump <code>@​babel/traverse</code> from 7.20.12 to
7.23.2</li>
<li>See full diff in <a
href="https://github.com/octokit/request.js/compare/v8.1.4...v8.1.6">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=@octokit/request&package-manager=npm_and_yarn&previous-version=8.1.4&new-version=8.1.6)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's major version (unless you unignore this specific
dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's minor version (unless you unignore this specific
dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR
and stop Dependabot creating any more for the specific dependency
(unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore
conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will
remove the ignore condition of the specified dependency and ignore
conditions


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-01 10:26:54 -08:00
semantic-release-bot
e995b4e40a build(release): 1.6.0 [skip ci]
# [1.6.0](https://github.com/actions/create-github-app-token/compare/v1.5.1...v1.6.0) (2023-11-16)

### Features

* add retry ([#79](https://github.com/actions/create-github-app-token/issues/79)) ([0f3b4d7](0f3b4d7df9)), closes [#71](https://github.com/actions/create-github-app-token/issues/71)
2023-11-16 22:53:33 +00:00
Stephane Moser
0f3b4d7df9 feat: add retry (#79)
resolves #71

- Add p-retry library
- Extract logic to new functions to improve the usage of retry logic
2023-11-12 08:00:38 -08:00
Gregor Martynus
9769eb4076 build(.node-version): use latest LTS version (#78)
this should resolve
https://github.com/actions/create-github-app-token/actions/runs/6741605908/job/18326430392
2023-11-06 12:58:23 -08:00
Grant Birkinbine
bb368d6a10 General Improvements (#70)
# General Improvements

> This is a classic @GrantBirki drive-by PR 🚗

This pull request does the following:

- Lightly updates and formats a few existing Actions workflows
- Adds a new `package-check` workflow to validate the contents of the
`dist/` directory have been properly built
- Uses a `.node-version` file so that local development and Actions
remain on the same pinned version of node
- Adds status badges to the readme for visual effect  🎨
2023-11-02 22:23:07 -07:00
14 changed files with 787 additions and 207 deletions

View File

@@ -1,5 +1,6 @@
name: release name: release
"on":
on:
push: push:
branches: branches:
- main - main
@@ -18,10 +19,12 @@ jobs:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
with: with:
persist-credentials: false persist-credentials: false
- uses: actions/setup-node@v4 - uses: actions/setup-node@v4
with: with:
node-version: 20 node-version-file: .node-version
cache: "npm" cache: 'npm'
- run: npm ci - run: npm ci
- run: npm run build - run: npm run build
- uses: ./ - uses: ./

View File

@@ -1,4 +1,5 @@
name: test name: test
on: on:
push: push:
branches: branches:
@@ -15,10 +16,12 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: actions/setup-node@v4 - uses: actions/setup-node@v4
with: with:
node-version: 20 node-version-file: .node-version
cache: "npm" cache: 'npm'
- run: npm ci - run: npm ci
- run: npm test - run: npm test

1
.node-version Normal file
View File

@@ -0,0 +1 @@
20.9.0

View File

@@ -1,5 +1,7 @@
# Create GitHub App Token # Create GitHub App Token
[![test](https://github.com/actions/create-github-app-token/actions/workflows/test.yml/badge.svg)](https://github.com/actions/create-github-app-token/actions/workflows/test.yml)
GitHub Action for creating a GitHub App installation access token. GitHub Action for creating a GitHub App installation access token.
## Usage ## Usage
@@ -46,7 +48,7 @@ jobs:
# required # required
app-id: ${{ vars.APP_ID }} app-id: ${{ vars.APP_ID }}
private-key: ${{ secrets.PRIVATE_KEY }} private-key: ${{ secrets.PRIVATE_KEY }}
- uses: actions/checkout@v3 - uses: actions/checkout@v4
with: with:
token: ${{ steps.app-token.outputs.token }} token: ${{ steps.app-token.outputs.token }}
ref: ${{ github.head_ref }} ref: ${{ github.head_ref }}

25
badges/coverage.svg Normal file
View File

@@ -0,0 +1,25 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="106"
height="20" role="img" aria-label="Coverage: 100%">
<title>Coverage: 100%</title>
<linearGradient id="s" x2="0" y2="100%">
<stop offset="0" stop-color="#bbb" stop-opacity=".1" />
<stop offset="1" stop-opacity=".1" />
</linearGradient>
<clipPath id="r">
<rect width="106" height="20" rx="3" fill="#fff" />
</clipPath>
<g clip-path="url(#r)">
<rect width="63" height="20" fill="#555" />
<rect x="63" width="43" height="20" fill="#4c1" />
<rect width="106" height="20" fill="url(#s)" />
</g>
<g fill="#fff" text-anchor="middle" font-family="Verdana,Geneva,DejaVu Sans,sans-serif"
text-rendering="geometricPrecision" font-size="110">
<text aria-hidden="true" x="325" y="150" fill="#010101" fill-opacity=".3"
transform="scale(.1)" textLength="530">Coverage</text>
<text x="325" y="140" transform="scale(.1)" fill="#fff" textLength="530">Coverage</text>
<text aria-hidden="true" x="835" y="150" fill="#010101" fill-opacity=".3"
transform="scale(.1)" textLength="330">100%</text>
<text x="835" y="140" transform="scale(.1)" fill="#fff" textLength="330">100%</text>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

438
dist/main.cjs vendored
View File

@@ -2811,8 +2811,18 @@ var require_dist_node5 = __commonJS({
module2.exports = __toCommonJS2(dist_src_exports); module2.exports = __toCommonJS2(dist_src_exports);
var import_endpoint = require_dist_node2(); var import_endpoint = require_dist_node2();
var import_universal_user_agent = require_dist_node(); var import_universal_user_agent = require_dist_node();
var VERSION = "8.1.4"; var VERSION = "8.1.6";
var import_is_plain_object = require_is_plain_object(); function isPlainObject(value) {
if (typeof value !== "object" || value === null)
return false;
if (Object.prototype.toString.call(value) !== "[object Object]")
return false;
const proto = Object.getPrototypeOf(value);
if (proto === null)
return true;
const Ctor = Object.prototype.hasOwnProperty.call(proto, "constructor") && proto.constructor;
return typeof Ctor === "function" && Ctor instanceof Ctor && Function.prototype.call(Ctor) === Function.prototype.call(value);
}
var import_request_error = require_dist_node4(); var import_request_error = require_dist_node4();
function getBufferResponse(response) { function getBufferResponse(response) {
return response.arrayBuffer(); return response.arrayBuffer();
@@ -2821,7 +2831,7 @@ var require_dist_node5 = __commonJS({
var _a, _b, _c; var _a, _b, _c;
const log = requestOptions.request && requestOptions.request.log ? requestOptions.request.log : console; const log = requestOptions.request && requestOptions.request.log ? requestOptions.request.log : console;
const parseSuccessResponseBody = ((_a = requestOptions.request) == null ? void 0 : _a.parseSuccessResponseBody) !== false; const parseSuccessResponseBody = ((_a = requestOptions.request) == null ? void 0 : _a.parseSuccessResponseBody) !== false;
if ((0, import_is_plain_object.isPlainObject)(requestOptions.body) || Array.isArray(requestOptions.body)) { if (isPlainObject(requestOptions.body) || Array.isArray(requestOptions.body)) {
requestOptions.body = JSON.stringify(requestOptions.body); requestOptions.body = JSON.stringify(requestOptions.body);
} }
let headers = {}; let headers = {};
@@ -2927,7 +2937,7 @@ var require_dist_node5 = __commonJS({
async function getResponseData(response) { async function getResponseData(response) {
const contentType = response.headers.get("content-type"); const contentType = response.headers.get("content-type");
if (/application\/json/.test(contentType)) { if (/application\/json/.test(contentType)) {
return response.json(); return response.json().catch(() => response.text()).catch(() => "");
} }
if (!contentType || /^text\/|charset=utf-8$/.test(contentType)) { if (!contentType || /^text\/|charset=utf-8$/.test(contentType)) {
return response.text(); return response.text();
@@ -7664,7 +7674,7 @@ var require_lodash = __commonJS({
} }
var objectProto = Object.prototype; var objectProto = Object.prototype;
var hasOwnProperty = objectProto.hasOwnProperty; var hasOwnProperty = objectProto.hasOwnProperty;
var objectToString = objectProto.toString; var objectToString2 = objectProto.toString;
var propertyIsEnumerable = objectProto.propertyIsEnumerable; var propertyIsEnumerable = objectProto.propertyIsEnumerable;
var nativeKeys = overArg(Object.keys, Object); var nativeKeys = overArg(Object.keys, Object);
var nativeMax = Math.max; var nativeMax = Math.max;
@@ -7708,7 +7718,7 @@ var require_lodash = __commonJS({
return isString(collection) ? fromIndex <= length && collection.indexOf(value, fromIndex) > -1 : !!length && baseIndexOf(collection, value, fromIndex) > -1; return isString(collection) ? fromIndex <= length && collection.indexOf(value, fromIndex) > -1 : !!length && baseIndexOf(collection, value, fromIndex) > -1;
} }
function isArguments(value) { function isArguments(value) {
return isArrayLikeObject(value) && hasOwnProperty.call(value, "callee") && (!propertyIsEnumerable.call(value, "callee") || objectToString.call(value) == argsTag); return isArrayLikeObject(value) && hasOwnProperty.call(value, "callee") && (!propertyIsEnumerable.call(value, "callee") || objectToString2.call(value) == argsTag);
} }
var isArray = Array.isArray; var isArray = Array.isArray;
function isArrayLike(value) { function isArrayLike(value) {
@@ -7718,7 +7728,7 @@ var require_lodash = __commonJS({
return isObjectLike(value) && isArrayLike(value); return isObjectLike(value) && isArrayLike(value);
} }
function isFunction(value) { function isFunction(value) {
var tag = isObject(value) ? objectToString.call(value) : ""; var tag = isObject(value) ? objectToString2.call(value) : "";
return tag == funcTag || tag == genTag; return tag == funcTag || tag == genTag;
} }
function isLength(value) { function isLength(value) {
@@ -7732,10 +7742,10 @@ var require_lodash = __commonJS({
return !!value && typeof value == "object"; return !!value && typeof value == "object";
} }
function isString(value) { function isString(value) {
return typeof value == "string" || !isArray(value) && isObjectLike(value) && objectToString.call(value) == stringTag; return typeof value == "string" || !isArray(value) && isObjectLike(value) && objectToString2.call(value) == stringTag;
} }
function isSymbol(value) { function isSymbol(value) {
return typeof value == "symbol" || isObjectLike(value) && objectToString.call(value) == symbolTag; return typeof value == "symbol" || isObjectLike(value) && objectToString2.call(value) == symbolTag;
} }
function toFinite(value) { function toFinite(value) {
if (!value) { if (!value) {
@@ -7785,9 +7795,9 @@ var require_lodash2 = __commonJS({
"node_modules/lodash.isboolean/index.js"(exports, module2) { "node_modules/lodash.isboolean/index.js"(exports, module2) {
var boolTag = "[object Boolean]"; var boolTag = "[object Boolean]";
var objectProto = Object.prototype; var objectProto = Object.prototype;
var objectToString = objectProto.toString; var objectToString2 = objectProto.toString;
function isBoolean(value) { function isBoolean(value) {
return value === true || value === false || isObjectLike(value) && objectToString.call(value) == boolTag; return value === true || value === false || isObjectLike(value) && objectToString2.call(value) == boolTag;
} }
function isObjectLike(value) { function isObjectLike(value) {
return !!value && typeof value == "object"; return !!value && typeof value == "object";
@@ -7809,7 +7819,7 @@ var require_lodash3 = __commonJS({
var reIsOctal = /^0o[0-7]+$/i; var reIsOctal = /^0o[0-7]+$/i;
var freeParseInt = parseInt; var freeParseInt = parseInt;
var objectProto = Object.prototype; var objectProto = Object.prototype;
var objectToString = objectProto.toString; var objectToString2 = objectProto.toString;
function isInteger(value) { function isInteger(value) {
return typeof value == "number" && value == toInteger(value); return typeof value == "number" && value == toInteger(value);
} }
@@ -7821,7 +7831,7 @@ var require_lodash3 = __commonJS({
return !!value && typeof value == "object"; return !!value && typeof value == "object";
} }
function isSymbol(value) { function isSymbol(value) {
return typeof value == "symbol" || isObjectLike(value) && objectToString.call(value) == symbolTag; return typeof value == "symbol" || isObjectLike(value) && objectToString2.call(value) == symbolTag;
} }
function toFinite(value) { function toFinite(value) {
if (!value) { if (!value) {
@@ -7865,12 +7875,12 @@ var require_lodash4 = __commonJS({
"node_modules/lodash.isnumber/index.js"(exports, module2) { "node_modules/lodash.isnumber/index.js"(exports, module2) {
var numberTag = "[object Number]"; var numberTag = "[object Number]";
var objectProto = Object.prototype; var objectProto = Object.prototype;
var objectToString = objectProto.toString; var objectToString2 = objectProto.toString;
function isObjectLike(value) { function isObjectLike(value) {
return !!value && typeof value == "object"; return !!value && typeof value == "object";
} }
function isNumber(value) { function isNumber(value) {
return typeof value == "number" || isObjectLike(value) && objectToString.call(value) == numberTag; return typeof value == "number" || isObjectLike(value) && objectToString2.call(value) == numberTag;
} }
module2.exports = isNumber; module2.exports = isNumber;
} }
@@ -7900,13 +7910,13 @@ var require_lodash5 = __commonJS({
var funcToString = funcProto.toString; var funcToString = funcProto.toString;
var hasOwnProperty = objectProto.hasOwnProperty; var hasOwnProperty = objectProto.hasOwnProperty;
var objectCtorString = funcToString.call(Object); var objectCtorString = funcToString.call(Object);
var objectToString = objectProto.toString; var objectToString2 = objectProto.toString;
var getPrototype = overArg(Object.getPrototypeOf, Object); var getPrototype = overArg(Object.getPrototypeOf, Object);
function isObjectLike(value) { function isObjectLike(value) {
return !!value && typeof value == "object"; return !!value && typeof value == "object";
} }
function isPlainObject(value) { function isPlainObject(value) {
if (!isObjectLike(value) || objectToString.call(value) != objectTag || isHostObject(value)) { if (!isObjectLike(value) || objectToString2.call(value) != objectTag || isHostObject(value)) {
return false; return false;
} }
var proto = getPrototype(value); var proto = getPrototype(value);
@@ -7925,13 +7935,13 @@ var require_lodash6 = __commonJS({
"node_modules/lodash.isstring/index.js"(exports, module2) { "node_modules/lodash.isstring/index.js"(exports, module2) {
var stringTag = "[object String]"; var stringTag = "[object String]";
var objectProto = Object.prototype; var objectProto = Object.prototype;
var objectToString = objectProto.toString; var objectToString2 = objectProto.toString;
var isArray = Array.isArray; var isArray = Array.isArray;
function isObjectLike(value) { function isObjectLike(value) {
return !!value && typeof value == "object"; return !!value && typeof value == "object";
} }
function isString(value) { function isString(value) {
return typeof value == "string" || !isArray(value) && isObjectLike(value) && objectToString.call(value) == stringTag; return typeof value == "string" || !isArray(value) && isObjectLike(value) && objectToString2.call(value) == stringTag;
} }
module2.exports = isString; module2.exports = isString;
} }
@@ -7951,7 +7961,7 @@ var require_lodash7 = __commonJS({
var reIsOctal = /^0o[0-7]+$/i; var reIsOctal = /^0o[0-7]+$/i;
var freeParseInt = parseInt; var freeParseInt = parseInt;
var objectProto = Object.prototype; var objectProto = Object.prototype;
var objectToString = objectProto.toString; var objectToString2 = objectProto.toString;
function before(n, func) { function before(n, func) {
var result; var result;
if (typeof func != "function") { if (typeof func != "function") {
@@ -7979,7 +7989,7 @@ var require_lodash7 = __commonJS({
return !!value && typeof value == "object"; return !!value && typeof value == "object";
} }
function isSymbol(value) { function isSymbol(value) {
return typeof value == "symbol" || isObjectLike(value) && objectToString.call(value) == symbolTag; return typeof value == "symbol" || isObjectLike(value) && objectToString2.call(value) == symbolTag;
} }
function toFinite(value) { function toFinite(value) {
if (!value) { if (!value) {
@@ -10009,10 +10019,340 @@ var require_dist_node12 = __commonJS({
} }
}); });
// node_modules/retry/lib/retry_operation.js
var require_retry_operation = __commonJS({
"node_modules/retry/lib/retry_operation.js"(exports, module2) {
function RetryOperation(timeouts, options) {
if (typeof options === "boolean") {
options = { forever: options };
}
this._originalTimeouts = JSON.parse(JSON.stringify(timeouts));
this._timeouts = timeouts;
this._options = options || {};
this._maxRetryTime = options && options.maxRetryTime || Infinity;
this._fn = null;
this._errors = [];
this._attempts = 1;
this._operationTimeout = null;
this._operationTimeoutCb = null;
this._timeout = null;
this._operationStart = null;
this._timer = null;
if (this._options.forever) {
this._cachedTimeouts = this._timeouts.slice(0);
}
}
module2.exports = RetryOperation;
RetryOperation.prototype.reset = function() {
this._attempts = 1;
this._timeouts = this._originalTimeouts.slice(0);
};
RetryOperation.prototype.stop = function() {
if (this._timeout) {
clearTimeout(this._timeout);
}
if (this._timer) {
clearTimeout(this._timer);
}
this._timeouts = [];
this._cachedTimeouts = null;
};
RetryOperation.prototype.retry = function(err) {
if (this._timeout) {
clearTimeout(this._timeout);
}
if (!err) {
return false;
}
var currentTime = (/* @__PURE__ */ new Date()).getTime();
if (err && currentTime - this._operationStart >= this._maxRetryTime) {
this._errors.push(err);
this._errors.unshift(new Error("RetryOperation timeout occurred"));
return false;
}
this._errors.push(err);
var timeout = this._timeouts.shift();
if (timeout === void 0) {
if (this._cachedTimeouts) {
this._errors.splice(0, this._errors.length - 1);
timeout = this._cachedTimeouts.slice(-1);
} else {
return false;
}
}
var self = this;
this._timer = setTimeout(function() {
self._attempts++;
if (self._operationTimeoutCb) {
self._timeout = setTimeout(function() {
self._operationTimeoutCb(self._attempts);
}, self._operationTimeout);
if (self._options.unref) {
self._timeout.unref();
}
}
self._fn(self._attempts);
}, timeout);
if (this._options.unref) {
this._timer.unref();
}
return true;
};
RetryOperation.prototype.attempt = function(fn, timeoutOps) {
this._fn = fn;
if (timeoutOps) {
if (timeoutOps.timeout) {
this._operationTimeout = timeoutOps.timeout;
}
if (timeoutOps.cb) {
this._operationTimeoutCb = timeoutOps.cb;
}
}
var self = this;
if (this._operationTimeoutCb) {
this._timeout = setTimeout(function() {
self._operationTimeoutCb();
}, self._operationTimeout);
}
this._operationStart = (/* @__PURE__ */ new Date()).getTime();
this._fn(this._attempts);
};
RetryOperation.prototype.try = function(fn) {
console.log("Using RetryOperation.try() is deprecated");
this.attempt(fn);
};
RetryOperation.prototype.start = function(fn) {
console.log("Using RetryOperation.start() is deprecated");
this.attempt(fn);
};
RetryOperation.prototype.start = RetryOperation.prototype.try;
RetryOperation.prototype.errors = function() {
return this._errors;
};
RetryOperation.prototype.attempts = function() {
return this._attempts;
};
RetryOperation.prototype.mainError = function() {
if (this._errors.length === 0) {
return null;
}
var counts = {};
var mainError = null;
var mainErrorCount = 0;
for (var i = 0; i < this._errors.length; i++) {
var error = this._errors[i];
var message = error.message;
var count = (counts[message] || 0) + 1;
counts[message] = count;
if (count >= mainErrorCount) {
mainError = error;
mainErrorCount = count;
}
}
return mainError;
};
}
});
// node_modules/retry/lib/retry.js
var require_retry = __commonJS({
"node_modules/retry/lib/retry.js"(exports) {
var RetryOperation = require_retry_operation();
exports.operation = function(options) {
var timeouts = exports.timeouts(options);
return new RetryOperation(timeouts, {
forever: options && (options.forever || options.retries === Infinity),
unref: options && options.unref,
maxRetryTime: options && options.maxRetryTime
});
};
exports.timeouts = function(options) {
if (options instanceof Array) {
return [].concat(options);
}
var opts = {
retries: 10,
factor: 2,
minTimeout: 1 * 1e3,
maxTimeout: Infinity,
randomize: false
};
for (var key in options) {
opts[key] = options[key];
}
if (opts.minTimeout > opts.maxTimeout) {
throw new Error("minTimeout is greater than maxTimeout");
}
var timeouts = [];
for (var i = 0; i < opts.retries; i++) {
timeouts.push(this.createTimeout(i, opts));
}
if (options && options.forever && !timeouts.length) {
timeouts.push(this.createTimeout(i, opts));
}
timeouts.sort(function(a, b) {
return a - b;
});
return timeouts;
};
exports.createTimeout = function(attempt, opts) {
var random = opts.randomize ? Math.random() + 1 : 1;
var timeout = Math.round(random * Math.max(opts.minTimeout, 1) * Math.pow(opts.factor, attempt));
timeout = Math.min(timeout, opts.maxTimeout);
return timeout;
};
exports.wrap = function(obj, options, methods) {
if (options instanceof Array) {
methods = options;
options = null;
}
if (!methods) {
methods = [];
for (var key in obj) {
if (typeof obj[key] === "function") {
methods.push(key);
}
}
}
for (var i = 0; i < methods.length; i++) {
var method = methods[i];
var original = obj[method];
obj[method] = function retryWrapper(original2) {
var op = exports.operation(options);
var args = Array.prototype.slice.call(arguments, 1);
var callback = args.pop();
args.push(function(err) {
if (op.retry(err)) {
return;
}
if (err) {
arguments[0] = op.mainError();
}
callback.apply(this, arguments);
});
op.attempt(function() {
original2.apply(obj, args);
});
}.bind(obj, original);
obj[method].options = options;
}
};
}
});
// node_modules/retry/index.js
var require_retry2 = __commonJS({
"node_modules/retry/index.js"(exports, module2) {
module2.exports = require_retry();
}
});
// main.js // main.js
var import_core = __toESM(require_core(), 1); var import_core = __toESM(require_core(), 1);
var import_auth_app = __toESM(require_dist_node12(), 1); var import_auth_app = __toESM(require_dist_node12(), 1);
// node_modules/p-retry/index.js
var import_retry = __toESM(require_retry2(), 1);
// node_modules/is-network-error/index.js
var objectToString = Object.prototype.toString;
var isError = (value) => objectToString.call(value) === "[object Error]";
var errorMessages = /* @__PURE__ */ new Set([
"Failed to fetch",
// Chrome
"NetworkError when attempting to fetch resource.",
// Firefox
"The Internet connection appears to be offline.",
// Safari 16
"Load failed",
// Safari 17+
"Network request failed",
// `cross-fetch`
"fetch failed"
// Undici (Node.js)
]);
function isNetworkError(error) {
const isValid = error && isError(error) && error.name === "TypeError" && typeof error.message === "string";
if (!isValid) {
return false;
}
if (error.message === "Load failed") {
return error.stack === void 0;
}
return errorMessages.has(error.message);
}
// node_modules/p-retry/index.js
var AbortError = class extends Error {
constructor(message) {
super();
if (message instanceof Error) {
this.originalError = message;
({ message } = message);
} else {
this.originalError = new Error(message);
this.originalError.stack = this.stack;
}
this.name = "AbortError";
this.message = message;
}
};
var decorateErrorWithCounts = (error, attemptNumber, options) => {
const retriesLeft = options.retries - (attemptNumber - 1);
error.attemptNumber = attemptNumber;
error.retriesLeft = retriesLeft;
return error;
};
async function pRetry(input, options) {
return new Promise((resolve, reject) => {
options = {
onFailedAttempt() {
},
retries: 10,
...options
};
const operation = import_retry.default.operation(options);
const abortHandler = () => {
operation.stop();
reject(options.signal?.reason);
};
if (options.signal && !options.signal.aborted) {
options.signal.addEventListener("abort", abortHandler, { once: true });
}
const cleanUp = () => {
options.signal?.removeEventListener("abort", abortHandler);
operation.stop();
};
operation.attempt(async (attemptNumber) => {
try {
const result = await input(attemptNumber);
cleanUp();
resolve(result);
} catch (error) {
try {
if (!(error instanceof Error)) {
throw new TypeError(`Non-error was thrown: "${error}". You should only throw errors.`);
}
if (error instanceof AbortError) {
throw error.originalError;
}
if (error instanceof TypeError && !isNetworkError(error)) {
throw error;
}
await options.onFailedAttempt(decorateErrorWithCounts(error, attemptNumber, options));
if (!operation.retry(error)) {
throw operation.mainError();
}
} catch (finalError) {
decorateErrorWithCounts(finalError, attemptNumber, options);
cleanUp();
reject(finalError);
}
}
});
});
}
// lib/main.js // lib/main.js
async function main(appId2, privateKey2, owner2, repositories2, core2, createAppAuth2, request2, skipTokenRevoke2) { async function main(appId2, privateKey2, owner2, repositories2, core2, createAppAuth2, request2, skipTokenRevoke2) {
let parsedOwner = ""; let parsedOwner = "";
@@ -10055,19 +10395,31 @@ async function main(appId2, privateKey2, owner2, repositories2, core2, createApp
}); });
let authentication; let authentication;
if (parsedRepositoryNames) { if (parsedRepositoryNames) {
const response = await request2("GET /repos/{owner}/{repo}/installation", { authentication = await pRetry(() => getTokenFromRepository(request2, auth, parsedOwner, appAuthentication, parsedRepositoryNames), {
owner: parsedOwner, onFailedAttempt: (error) => {
repo: parsedRepositoryNames.split(",")[0], core2.info(
headers: { `Failed to create token for "${parsedRepositoryNames}" (attempt ${error.attemptNumber}): ${error.message}`
authorization: `bearer ${appAuthentication.token}` );
} },
}); retries: 3
authentication = await auth({
type: "installation",
installationId: response.data.id,
repositoryNames: parsedRepositoryNames.split(",")
}); });
} else { } else {
authentication = await pRetry(() => getTokenFromOwner(request2, auth, appAuthentication, parsedOwner), {
onFailedAttempt: (error) => {
core2.info(
`Failed to create token for "${parsedOwner}" (attempt ${error.attemptNumber}): ${error.message}`
);
},
retries: 3
});
}
core2.setSecret(authentication.token);
core2.setOutput("token", authentication.token);
if (!skipTokenRevoke2) {
core2.saveState("token", authentication.token);
}
}
async function getTokenFromOwner(request2, auth, appAuthentication, parsedOwner) {
const response = await request2("GET /orgs/{org}/installation", { const response = await request2("GET /orgs/{org}/installation", {
org: parsedOwner, org: parsedOwner,
headers: { headers: {
@@ -10083,16 +10435,26 @@ async function main(appId2, privateKey2, owner2, repositories2, core2, createApp
} }
}); });
}); });
authentication = await auth({ const authentication = await auth({
type: "installation", type: "installation",
installationId: response.data.id installationId: response.data.id
}); });
return authentication;
}
async function getTokenFromRepository(request2, auth, parsedOwner, appAuthentication, parsedRepositoryNames) {
const response = await request2("GET /repos/{owner}/{repo}/installation", {
owner: parsedOwner,
repo: parsedRepositoryNames.split(",")[0],
headers: {
authorization: `bearer ${appAuthentication.token}`
} }
core2.setSecret(authentication.token); });
core2.setOutput("token", authentication.token); const authentication = await auth({
if (!skipTokenRevoke2) { type: "installation",
core2.saveState("token", authentication.token); installationId: response.data.id,
} repositoryNames: parsedRepositoryNames.split(",")
});
return authentication;
} }
// lib/request.js // lib/request.js

18
dist/post.cjs vendored
View File

@@ -2811,8 +2811,18 @@ var require_dist_node5 = __commonJS({
module2.exports = __toCommonJS2(dist_src_exports); module2.exports = __toCommonJS2(dist_src_exports);
var import_endpoint = require_dist_node2(); var import_endpoint = require_dist_node2();
var import_universal_user_agent = require_dist_node(); var import_universal_user_agent = require_dist_node();
var VERSION = "8.1.4"; var VERSION = "8.1.6";
var import_is_plain_object = require_is_plain_object(); function isPlainObject(value) {
if (typeof value !== "object" || value === null)
return false;
if (Object.prototype.toString.call(value) !== "[object Object]")
return false;
const proto = Object.getPrototypeOf(value);
if (proto === null)
return true;
const Ctor = Object.prototype.hasOwnProperty.call(proto, "constructor") && proto.constructor;
return typeof Ctor === "function" && Ctor instanceof Ctor && Function.prototype.call(Ctor) === Function.prototype.call(value);
}
var import_request_error = require_dist_node4(); var import_request_error = require_dist_node4();
function getBufferResponse(response) { function getBufferResponse(response) {
return response.arrayBuffer(); return response.arrayBuffer();
@@ -2821,7 +2831,7 @@ var require_dist_node5 = __commonJS({
var _a, _b, _c; var _a, _b, _c;
const log = requestOptions.request && requestOptions.request.log ? requestOptions.request.log : console; const log = requestOptions.request && requestOptions.request.log ? requestOptions.request.log : console;
const parseSuccessResponseBody = ((_a = requestOptions.request) == null ? void 0 : _a.parseSuccessResponseBody) !== false; const parseSuccessResponseBody = ((_a = requestOptions.request) == null ? void 0 : _a.parseSuccessResponseBody) !== false;
if ((0, import_is_plain_object.isPlainObject)(requestOptions.body) || Array.isArray(requestOptions.body)) { if (isPlainObject(requestOptions.body) || Array.isArray(requestOptions.body)) {
requestOptions.body = JSON.stringify(requestOptions.body); requestOptions.body = JSON.stringify(requestOptions.body);
} }
let headers = {}; let headers = {};
@@ -2927,7 +2937,7 @@ var require_dist_node5 = __commonJS({
async function getResponseData(response) { async function getResponseData(response) {
const contentType = response.headers.get("content-type"); const contentType = response.headers.get("content-type");
if (/application\/json/.test(contentType)) { if (/application\/json/.test(contentType)) {
return response.json(); return response.json().catch(() => response.text()).catch(() => "");
} }
if (!contentType || /^text\/|charset=utf-8$/.test(contentType)) { if (!contentType || /^text\/|charset=utf-8$/.test(contentType)) {
return response.text(); return response.text();

View File

@@ -1,3 +1,4 @@
import pRetry from "p-retry";
// @ts-check // @ts-check
/** /**
@@ -75,25 +76,42 @@ export async function main(
let authentication; let authentication;
// If at least one repository is set, get installation ID from that repository // If at least one repository is set, get installation ID from that repository
// https://docs.github.com/rest/apps/apps?apiVersion=2022-11-28#get-a-repository-installation-for-the-authenticated-app
if (parsedRepositoryNames) { if (parsedRepositoryNames) {
const response = await request("GET /repos/{owner}/{repo}/installation", { authentication = await pRetry(() => getTokenFromRepository(request, auth, parsedOwner,appAuthentication, parsedRepositoryNames), {
owner: parsedOwner, onFailedAttempt: (error) => {
repo: parsedRepositoryNames.split(",")[0], core.info(
headers: { `Failed to create token for "${parsedRepositoryNames}" (attempt ${error.attemptNumber}): ${error.message}`
authorization: `bearer ${appAuthentication.token}`, );
}, },
retries: 3,
}); });
// Get token for given repositories
authentication = await auth({
type: "installation",
installationId: response.data.id,
repositoryNames: parsedRepositoryNames.split(","),
});
} else { } else {
// Otherwise get the installation for the owner, which can either be an organization or a user account // Otherwise get the installation for the owner, which can either be an organization or a user account
// https://docs.github.com/rest/apps/apps?apiVersion=2022-11-28#get-a-repository-installation-for-the-authenticated-app authentication = await pRetry(() => getTokenFromOwner(request, auth, appAuthentication, parsedOwner), {
onFailedAttempt: (error) => {
core.info(
`Failed to create token for "${parsedOwner}" (attempt ${error.attemptNumber}): ${error.message}`
);
},
retries: 3,
});
}
// Register the token with the runner as a secret to ensure it is masked in logs
core.setSecret(authentication.token);
core.setOutput("token", authentication.token);
// Make token accessible to post function (so we can invalidate it)
if (!skipTokenRevoke) {
core.saveState("token", authentication.token);
}
}
async function getTokenFromOwner(request, auth, appAuthentication, parsedOwner) {
// https://docs.github.com/en/rest/apps/apps?apiVersion=2022-11-28#get-an-organization-installation-for-the-authenticated-app
const response = await request("GET /orgs/{org}/installation", { const response = await request("GET /orgs/{org}/installation", {
org: parsedOwner, org: parsedOwner,
headers: { headers: {
@@ -113,19 +131,29 @@ export async function main(
}); });
// Get token for for all repositories of the given installation // Get token for for all repositories of the given installation
authentication = await auth({ const authentication = await auth({
type: "installation", type: "installation",
installationId: response.data.id, installationId: response.data.id,
}); });
} return authentication;
}
// Register the token with the runner as a secret to ensure it is masked in logs
core.setSecret(authentication.token); async function getTokenFromRepository(request, auth, parsedOwner,appAuthentication, parsedRepositoryNames) {
// https://docs.github.com/rest/apps/apps?apiVersion=2022-11-28#get-a-repository-installation-for-the-authenticated-app
core.setOutput("token", authentication.token); const response = await request("GET /repos/{owner}/{repo}/installation", {
owner: parsedOwner,
// Make token accessible to post function (so we can invalidate it) repo: parsedRepositoryNames.split(",")[0],
if (!skipTokenRevoke) { headers: {
core.saveState("token", authentication.token); authorization: `bearer ${appAuthentication.token}`,
} },
});
// Get token for given repositories
const authentication = await auth({
type: "installation",
installationId: response.data.id,
repositoryNames: parsedRepositoryNames.split(","),
});
return authentication;
} }

254
package-lock.json generated
View File

@@ -1,27 +1,28 @@
{ {
"name": "create-github-app-token", "name": "create-github-app-token",
"version": "1.5.0", "version": "1.6.0",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "create-github-app-token", "name": "create-github-app-token",
"version": "1.5.0", "version": "1.6.0",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@actions/core": "^1.10.1", "@actions/core": "^1.10.1",
"@octokit/auth-app": "^6.0.1", "@octokit/auth-app": "^6.0.1",
"@octokit/request": "^8.1.4" "@octokit/request": "^8.1.6",
"p-retry": "^6.1.0"
}, },
"devDependencies": { "devDependencies": {
"ava": "^5.3.1", "ava": "^5.3.1",
"c8": "^8.0.1", "c8": "^8.0.1",
"dotenv": "^16.3.1", "dotenv": "^16.3.1",
"esbuild": "^0.19.5", "esbuild": "^0.19.8",
"execa": "^8.0.1", "execa": "^8.0.1",
"open-cli": "^7.2.0", "open-cli": "^7.2.0",
"undici": "^5.27.0", "undici": "^5.28.2",
"yaml": "^2.3.3" "yaml": "^2.3.4"
} }
}, },
"node_modules/@actions/core": { "node_modules/@actions/core": {
@@ -226,9 +227,9 @@
"dev": true "dev": true
}, },
"node_modules/@esbuild/android-arm": { "node_modules/@esbuild/android-arm": {
"version": "0.19.5", "version": "0.19.8",
"resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.19.5.tgz", "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.19.8.tgz",
"integrity": "sha512-bhvbzWFF3CwMs5tbjf3ObfGqbl/17ict2/uwOSfr3wmxDE6VdS2GqY/FuzIPe0q0bdhj65zQsvqfArI9MY6+AA==", "integrity": "sha512-31E2lxlGM1KEfivQl8Yf5aYU/mflz9g06H6S15ITUFQueMFtFjESRMoDSkvMo8thYvLBax+VKTPlpnx+sPicOA==",
"cpu": [ "cpu": [
"arm" "arm"
], ],
@@ -242,9 +243,9 @@
} }
}, },
"node_modules/@esbuild/android-arm64": { "node_modules/@esbuild/android-arm64": {
"version": "0.19.5", "version": "0.19.8",
"resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.19.5.tgz", "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.19.8.tgz",
"integrity": "sha512-5d1OkoJxnYQfmC+Zd8NBFjkhyCNYwM4n9ODrycTFY6Jk1IGiZ+tjVJDDSwDt77nK+tfpGP4T50iMtVi4dEGzhQ==", "integrity": "sha512-B8JbS61bEunhfx8kasogFENgQfr/dIp+ggYXwTqdbMAgGDhRa3AaPpQMuQU0rNxDLECj6FhDzk1cF9WHMVwrtA==",
"cpu": [ "cpu": [
"arm64" "arm64"
], ],
@@ -258,9 +259,9 @@
} }
}, },
"node_modules/@esbuild/android-x64": { "node_modules/@esbuild/android-x64": {
"version": "0.19.5", "version": "0.19.8",
"resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.19.5.tgz", "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.19.8.tgz",
"integrity": "sha512-9t+28jHGL7uBdkBjL90QFxe7DVA+KGqWlHCF8ChTKyaKO//VLuoBricQCgwhOjA1/qOczsw843Fy4cbs4H3DVA==", "integrity": "sha512-rdqqYfRIn4jWOp+lzQttYMa2Xar3OK9Yt2fhOhzFXqg0rVWEfSclJvZq5fZslnz6ypHvVf3CT7qyf0A5pM682A==",
"cpu": [ "cpu": [
"x64" "x64"
], ],
@@ -274,9 +275,9 @@
} }
}, },
"node_modules/@esbuild/darwin-arm64": { "node_modules/@esbuild/darwin-arm64": {
"version": "0.19.5", "version": "0.19.8",
"resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.19.5.tgz", "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.19.8.tgz",
"integrity": "sha512-mvXGcKqqIqyKoxq26qEDPHJuBYUA5KizJncKOAf9eJQez+L9O+KfvNFu6nl7SCZ/gFb2QPaRqqmG0doSWlgkqw==", "integrity": "sha512-RQw9DemMbIq35Bprbboyf8SmOr4UXsRVxJ97LgB55VKKeJOOdvsIPy0nFyF2l8U+h4PtBx/1kRf0BelOYCiQcw==",
"cpu": [ "cpu": [
"arm64" "arm64"
], ],
@@ -290,9 +291,9 @@
} }
}, },
"node_modules/@esbuild/darwin-x64": { "node_modules/@esbuild/darwin-x64": {
"version": "0.19.5", "version": "0.19.8",
"resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.19.5.tgz", "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.19.8.tgz",
"integrity": "sha512-Ly8cn6fGLNet19s0X4unjcniX24I0RqjPv+kurpXabZYSXGM4Pwpmf85WHJN3lAgB8GSth7s5A0r856S+4DyiA==", "integrity": "sha512-3sur80OT9YdeZwIVgERAysAbwncom7b4bCI2XKLjMfPymTud7e/oY4y+ci1XVp5TfQp/bppn7xLw1n/oSQY3/Q==",
"cpu": [ "cpu": [
"x64" "x64"
], ],
@@ -306,9 +307,9 @@
} }
}, },
"node_modules/@esbuild/freebsd-arm64": { "node_modules/@esbuild/freebsd-arm64": {
"version": "0.19.5", "version": "0.19.8",
"resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.19.5.tgz", "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.19.8.tgz",
"integrity": "sha512-GGDNnPWTmWE+DMchq1W8Sd0mUkL+APvJg3b11klSGUDvRXh70JqLAO56tubmq1s2cgpVCSKYywEiKBfju8JztQ==", "integrity": "sha512-WAnPJSDattvS/XtPCTj1tPoTxERjcTpH6HsMr6ujTT+X6rylVe8ggxk8pVxzf5U1wh5sPODpawNicF5ta/9Tmw==",
"cpu": [ "cpu": [
"arm64" "arm64"
], ],
@@ -322,9 +323,9 @@
} }
}, },
"node_modules/@esbuild/freebsd-x64": { "node_modules/@esbuild/freebsd-x64": {
"version": "0.19.5", "version": "0.19.8",
"resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.19.5.tgz", "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.19.8.tgz",
"integrity": "sha512-1CCwDHnSSoA0HNwdfoNY0jLfJpd7ygaLAp5EHFos3VWJCRX9DMwWODf96s9TSse39Br7oOTLryRVmBoFwXbuuQ==", "integrity": "sha512-ICvZyOplIjmmhjd6mxi+zxSdpPTKFfyPPQMQTK/w+8eNK6WV01AjIztJALDtwNNfFhfZLux0tZLC+U9nSyA5Zg==",
"cpu": [ "cpu": [
"x64" "x64"
], ],
@@ -338,9 +339,9 @@
} }
}, },
"node_modules/@esbuild/linux-arm": { "node_modules/@esbuild/linux-arm": {
"version": "0.19.5", "version": "0.19.8",
"resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.19.5.tgz", "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.19.8.tgz",
"integrity": "sha512-lrWXLY/vJBzCPC51QN0HM71uWgIEpGSjSZZADQhq7DKhPcI6NH1IdzjfHkDQws2oNpJKpR13kv7/pFHBbDQDwQ==", "integrity": "sha512-H4vmI5PYqSvosPaTJuEppU9oz1dq2A7Mr2vyg5TF9Ga+3+MGgBdGzcyBP7qK9MrwFQZlvNyJrvz6GuCaj3OukQ==",
"cpu": [ "cpu": [
"arm" "arm"
], ],
@@ -354,9 +355,9 @@
} }
}, },
"node_modules/@esbuild/linux-arm64": { "node_modules/@esbuild/linux-arm64": {
"version": "0.19.5", "version": "0.19.8",
"resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.19.5.tgz", "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.19.8.tgz",
"integrity": "sha512-o3vYippBmSrjjQUCEEiTZ2l+4yC0pVJD/Dl57WfPwwlvFkrxoSO7rmBZFii6kQB3Wrn/6GwJUPLU5t52eq2meA==", "integrity": "sha512-z1zMZivxDLHWnyGOctT9JP70h0beY54xDDDJt4VpTX+iwA77IFsE1vCXWmprajJGa+ZYSqkSbRQ4eyLCpCmiCQ==",
"cpu": [ "cpu": [
"arm64" "arm64"
], ],
@@ -370,9 +371,9 @@
} }
}, },
"node_modules/@esbuild/linux-ia32": { "node_modules/@esbuild/linux-ia32": {
"version": "0.19.5", "version": "0.19.8",
"resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.19.5.tgz", "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.19.8.tgz",
"integrity": "sha512-MkjHXS03AXAkNp1KKkhSKPOCYztRtK+KXDNkBa6P78F8Bw0ynknCSClO/ztGszILZtyO/lVKpa7MolbBZ6oJtQ==", "integrity": "sha512-1a8suQiFJmZz1khm/rDglOc8lavtzEMRo0v6WhPgxkrjcU0LkHj+TwBrALwoz/OtMExvsqbbMI0ChyelKabSvQ==",
"cpu": [ "cpu": [
"ia32" "ia32"
], ],
@@ -386,9 +387,9 @@
} }
}, },
"node_modules/@esbuild/linux-loong64": { "node_modules/@esbuild/linux-loong64": {
"version": "0.19.5", "version": "0.19.8",
"resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.19.5.tgz", "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.19.8.tgz",
"integrity": "sha512-42GwZMm5oYOD/JHqHska3Jg0r+XFb/fdZRX+WjADm3nLWLcIsN27YKtqxzQmGNJgu0AyXg4HtcSK9HuOk3v1Dw==", "integrity": "sha512-fHZWS2JJxnXt1uYJsDv9+b60WCc2RlvVAy1F76qOLtXRO+H4mjt3Tr6MJ5l7Q78X8KgCFudnTuiQRBhULUyBKQ==",
"cpu": [ "cpu": [
"loong64" "loong64"
], ],
@@ -402,9 +403,9 @@
} }
}, },
"node_modules/@esbuild/linux-mips64el": { "node_modules/@esbuild/linux-mips64el": {
"version": "0.19.5", "version": "0.19.8",
"resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.19.5.tgz", "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.19.8.tgz",
"integrity": "sha512-kcjndCSMitUuPJobWCnwQ9lLjiLZUR3QLQmlgaBfMX23UEa7ZOrtufnRds+6WZtIS9HdTXqND4yH8NLoVVIkcg==", "integrity": "sha512-Wy/z0EL5qZYLX66dVnEg9riiwls5IYnziwuju2oUiuxVc+/edvqXa04qNtbrs0Ukatg5HEzqT94Zs7J207dN5Q==",
"cpu": [ "cpu": [
"mips64el" "mips64el"
], ],
@@ -418,9 +419,9 @@
} }
}, },
"node_modules/@esbuild/linux-ppc64": { "node_modules/@esbuild/linux-ppc64": {
"version": "0.19.5", "version": "0.19.8",
"resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.19.5.tgz", "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.19.8.tgz",
"integrity": "sha512-yJAxJfHVm0ZbsiljbtFFP1BQKLc8kUF6+17tjQ78QjqjAQDnhULWiTA6u0FCDmYT1oOKS9PzZ2z0aBI+Mcyj7Q==", "integrity": "sha512-ETaW6245wK23YIEufhMQ3HSeHO7NgsLx8gygBVldRHKhOlD1oNeNy/P67mIh1zPn2Hr2HLieQrt6tWrVwuqrxg==",
"cpu": [ "cpu": [
"ppc64" "ppc64"
], ],
@@ -434,9 +435,9 @@
} }
}, },
"node_modules/@esbuild/linux-riscv64": { "node_modules/@esbuild/linux-riscv64": {
"version": "0.19.5", "version": "0.19.8",
"resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.19.5.tgz", "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.19.8.tgz",
"integrity": "sha512-5u8cIR/t3gaD6ad3wNt1MNRstAZO+aNyBxu2We8X31bA8XUNyamTVQwLDA1SLoPCUehNCymhBhK3Qim1433Zag==", "integrity": "sha512-T2DRQk55SgoleTP+DtPlMrxi/5r9AeFgkhkZ/B0ap99zmxtxdOixOMI570VjdRCs9pE4Wdkz7JYrsPvsl7eESg==",
"cpu": [ "cpu": [
"riscv64" "riscv64"
], ],
@@ -450,9 +451,9 @@
} }
}, },
"node_modules/@esbuild/linux-s390x": { "node_modules/@esbuild/linux-s390x": {
"version": "0.19.5", "version": "0.19.8",
"resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.19.5.tgz", "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.19.8.tgz",
"integrity": "sha512-Z6JrMyEw/EmZBD/OFEFpb+gao9xJ59ATsoTNlj39jVBbXqoZm4Xntu6wVmGPB/OATi1uk/DB+yeDPv2E8PqZGw==", "integrity": "sha512-NPxbdmmo3Bk7mbNeHmcCd7R7fptJaczPYBaELk6NcXxy7HLNyWwCyDJ/Xx+/YcNH7Im5dHdx9gZ5xIwyliQCbg==",
"cpu": [ "cpu": [
"s390x" "s390x"
], ],
@@ -466,9 +467,9 @@
} }
}, },
"node_modules/@esbuild/linux-x64": { "node_modules/@esbuild/linux-x64": {
"version": "0.19.5", "version": "0.19.8",
"resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.19.5.tgz", "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.19.8.tgz",
"integrity": "sha512-psagl+2RlK1z8zWZOmVdImisMtrUxvwereIdyJTmtmHahJTKb64pAcqoPlx6CewPdvGvUKe2Jw+0Z/0qhSbG1A==", "integrity": "sha512-lytMAVOM3b1gPypL2TRmZ5rnXl7+6IIk8uB3eLsV1JwcizuolblXRrc5ShPrO9ls/b+RTp+E6gbsuLWHWi2zGg==",
"cpu": [ "cpu": [
"x64" "x64"
], ],
@@ -482,9 +483,9 @@
} }
}, },
"node_modules/@esbuild/netbsd-x64": { "node_modules/@esbuild/netbsd-x64": {
"version": "0.19.5", "version": "0.19.8",
"resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.19.5.tgz", "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.19.8.tgz",
"integrity": "sha512-kL2l+xScnAy/E/3119OggX8SrWyBEcqAh8aOY1gr4gPvw76la2GlD4Ymf832UCVbmuWeTf2adkZDK+h0Z/fB4g==", "integrity": "sha512-hvWVo2VsXz/8NVt1UhLzxwAfo5sioj92uo0bCfLibB0xlOmimU/DeAEsQILlBQvkhrGjamP0/el5HU76HAitGw==",
"cpu": [ "cpu": [
"x64" "x64"
], ],
@@ -498,9 +499,9 @@
} }
}, },
"node_modules/@esbuild/openbsd-x64": { "node_modules/@esbuild/openbsd-x64": {
"version": "0.19.5", "version": "0.19.8",
"resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.19.5.tgz", "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.19.8.tgz",
"integrity": "sha512-sPOfhtzFufQfTBgRnE1DIJjzsXukKSvZxloZbkJDG383q0awVAq600pc1nfqBcl0ice/WN9p4qLc39WhBShRTA==", "integrity": "sha512-/7Y7u77rdvmGTxR83PgaSvSBJCC2L3Kb1M/+dmSIvRvQPXXCuC97QAwMugBNG0yGcbEGfFBH7ojPzAOxfGNkwQ==",
"cpu": [ "cpu": [
"x64" "x64"
], ],
@@ -514,9 +515,9 @@
} }
}, },
"node_modules/@esbuild/sunos-x64": { "node_modules/@esbuild/sunos-x64": {
"version": "0.19.5", "version": "0.19.8",
"resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.19.5.tgz", "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.19.8.tgz",
"integrity": "sha512-dGZkBXaafuKLpDSjKcB0ax0FL36YXCvJNnztjKV+6CO82tTYVDSH2lifitJ29jxRMoUhgkg9a+VA/B03WK5lcg==", "integrity": "sha512-9Lc4s7Oi98GqFA4HzA/W2JHIYfnXbUYgekUP/Sm4BG9sfLjyv6GKKHKKVs83SMicBF2JwAX6A1PuOLMqpD001w==",
"cpu": [ "cpu": [
"x64" "x64"
], ],
@@ -530,9 +531,9 @@
} }
}, },
"node_modules/@esbuild/win32-arm64": { "node_modules/@esbuild/win32-arm64": {
"version": "0.19.5", "version": "0.19.8",
"resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.19.5.tgz", "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.19.8.tgz",
"integrity": "sha512-dWVjD9y03ilhdRQ6Xig1NWNgfLtf2o/STKTS+eZuF90fI2BhbwD6WlaiCGKptlqXlURVB5AUOxUj09LuwKGDTg==", "integrity": "sha512-rq6WzBGjSzihI9deW3fC2Gqiak68+b7qo5/3kmB6Gvbh/NYPA0sJhrnp7wgV4bNwjqM+R2AApXGxMO7ZoGhIJg==",
"cpu": [ "cpu": [
"arm64" "arm64"
], ],
@@ -546,9 +547,9 @@
} }
}, },
"node_modules/@esbuild/win32-ia32": { "node_modules/@esbuild/win32-ia32": {
"version": "0.19.5", "version": "0.19.8",
"resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.19.5.tgz", "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.19.8.tgz",
"integrity": "sha512-4liggWIA4oDgUxqpZwrDhmEfAH4d0iljanDOK7AnVU89T6CzHon/ony8C5LeOdfgx60x5cnQJFZwEydVlYx4iw==", "integrity": "sha512-AIAbverbg5jMvJznYiGhrd3sumfwWs8572mIJL5NQjJa06P8KfCPWZQ0NwZbPQnbQi9OWSZhFVSUWjjIrn4hSw==",
"cpu": [ "cpu": [
"ia32" "ia32"
], ],
@@ -562,9 +563,9 @@
} }
}, },
"node_modules/@esbuild/win32-x64": { "node_modules/@esbuild/win32-x64": {
"version": "0.19.5", "version": "0.19.8",
"resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.19.5.tgz", "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.19.8.tgz",
"integrity": "sha512-czTrygUsB/jlM8qEW5MD8bgYU2Xg14lo6kBDXW6HdxKjh8M5PzETGiSHaz9MtbXBYDloHNUAUW2tMiKW4KM9Mw==", "integrity": "sha512-bfZ0cQ1uZs2PqpulNL5j/3w+GDhP36k1K5c38QdQg+Swy51jFZWWeIkteNsufkQxp986wnqRRsb/bHbY1WQ7TA==",
"cpu": [ "cpu": [
"x64" "x64"
], ],
@@ -776,14 +777,13 @@
"integrity": "sha512-PclQ6JGMTE9iUStpzMkwLCISFn/wDeRjkZFIKALpvJQNBGwDoYYi2fFvuHwssoQ1rXI5mfh6jgTgWuddeUzfWw==" "integrity": "sha512-PclQ6JGMTE9iUStpzMkwLCISFn/wDeRjkZFIKALpvJQNBGwDoYYi2fFvuHwssoQ1rXI5mfh6jgTgWuddeUzfWw=="
}, },
"node_modules/@octokit/request": { "node_modules/@octokit/request": {
"version": "8.1.4", "version": "8.1.6",
"resolved": "https://registry.npmjs.org/@octokit/request/-/request-8.1.4.tgz", "resolved": "https://registry.npmjs.org/@octokit/request/-/request-8.1.6.tgz",
"integrity": "sha512-M0aaFfpGPEKrg7XoA/gwgRvc9MSXHRO2Ioki1qrPDbl1e9YhjIwVoHE7HIKmv/m3idzldj//xBujcFNqGX6ENA==", "integrity": "sha512-YhPaGml3ncZC1NfXpP3WZ7iliL1ap6tLkAp6MvbK2fTTPytzVUyUesBBogcdMm86uRYO5rHaM1xIWxigWZ17MQ==",
"dependencies": { "dependencies": {
"@octokit/endpoint": "^9.0.0", "@octokit/endpoint": "^9.0.0",
"@octokit/request-error": "^5.0.0", "@octokit/request-error": "^5.0.0",
"@octokit/types": "^12.0.0", "@octokit/types": "^12.0.0",
"is-plain-object": "^5.0.0",
"universal-user-agent": "^6.0.0" "universal-user-agent": "^6.0.0"
}, },
"engines": { "engines": {
@@ -853,6 +853,11 @@
"integrity": "sha512-lqa4UEhhv/2sjjIQgjX8B+RBjj47eo0mzGasklVJ78UKGQY1r0VpB9XHDaZZO9qzEFDdy4MrXLuEaSmPrPSe/A==", "integrity": "sha512-lqa4UEhhv/2sjjIQgjX8B+RBjj47eo0mzGasklVJ78UKGQY1r0VpB9XHDaZZO9qzEFDdy4MrXLuEaSmPrPSe/A==",
"dev": true "dev": true
}, },
"node_modules/@types/retry": {
"version": "0.12.2",
"resolved": "https://registry.npmjs.org/@types/retry/-/retry-0.12.2.tgz",
"integrity": "sha512-XISRgDJ2Tc5q4TRqvgJtzsRkFYNJzZrhTdtMoGVBttwzzQJkPnS3WWTFc7kuDRoPtPakl+T+OfdEUjYJj7Jbow=="
},
"node_modules/acorn": { "node_modules/acorn": {
"version": "8.10.0", "version": "8.10.0",
"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz",
@@ -1841,9 +1846,9 @@
} }
}, },
"node_modules/esbuild": { "node_modules/esbuild": {
"version": "0.19.5", "version": "0.19.8",
"resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.19.5.tgz", "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.19.8.tgz",
"integrity": "sha512-bUxalY7b1g8vNhQKdB24QDmHeY4V4tw/s6Ak5z+jJX9laP5MoQseTOMemAr0gxssjNcH0MCViG8ONI2kksvfFQ==", "integrity": "sha512-l7iffQpT2OrZfH2rXIp7/FkmaeZM0vxbxN9KfiCwGYuZqzMg/JdvX26R31Zxn/Pxvsrg3Y9N6XTcnknqDyyv4w==",
"dev": true, "dev": true,
"hasInstallScript": true, "hasInstallScript": true,
"bin": { "bin": {
@@ -1853,28 +1858,28 @@
"node": ">=12" "node": ">=12"
}, },
"optionalDependencies": { "optionalDependencies": {
"@esbuild/android-arm": "0.19.5", "@esbuild/android-arm": "0.19.8",
"@esbuild/android-arm64": "0.19.5", "@esbuild/android-arm64": "0.19.8",
"@esbuild/android-x64": "0.19.5", "@esbuild/android-x64": "0.19.8",
"@esbuild/darwin-arm64": "0.19.5", "@esbuild/darwin-arm64": "0.19.8",
"@esbuild/darwin-x64": "0.19.5", "@esbuild/darwin-x64": "0.19.8",
"@esbuild/freebsd-arm64": "0.19.5", "@esbuild/freebsd-arm64": "0.19.8",
"@esbuild/freebsd-x64": "0.19.5", "@esbuild/freebsd-x64": "0.19.8",
"@esbuild/linux-arm": "0.19.5", "@esbuild/linux-arm": "0.19.8",
"@esbuild/linux-arm64": "0.19.5", "@esbuild/linux-arm64": "0.19.8",
"@esbuild/linux-ia32": "0.19.5", "@esbuild/linux-ia32": "0.19.8",
"@esbuild/linux-loong64": "0.19.5", "@esbuild/linux-loong64": "0.19.8",
"@esbuild/linux-mips64el": "0.19.5", "@esbuild/linux-mips64el": "0.19.8",
"@esbuild/linux-ppc64": "0.19.5", "@esbuild/linux-ppc64": "0.19.8",
"@esbuild/linux-riscv64": "0.19.5", "@esbuild/linux-riscv64": "0.19.8",
"@esbuild/linux-s390x": "0.19.5", "@esbuild/linux-s390x": "0.19.8",
"@esbuild/linux-x64": "0.19.5", "@esbuild/linux-x64": "0.19.8",
"@esbuild/netbsd-x64": "0.19.5", "@esbuild/netbsd-x64": "0.19.8",
"@esbuild/openbsd-x64": "0.19.5", "@esbuild/openbsd-x64": "0.19.8",
"@esbuild/sunos-x64": "0.19.5", "@esbuild/sunos-x64": "0.19.8",
"@esbuild/win32-arm64": "0.19.5", "@esbuild/win32-arm64": "0.19.8",
"@esbuild/win32-ia32": "0.19.5", "@esbuild/win32-ia32": "0.19.8",
"@esbuild/win32-x64": "0.19.5" "@esbuild/win32-x64": "0.19.8"
} }
}, },
"node_modules/escalade": { "node_modules/escalade": {
@@ -2407,6 +2412,17 @@
"url": "https://github.com/sponsors/sindresorhus" "url": "https://github.com/sponsors/sindresorhus"
} }
}, },
"node_modules/is-network-error": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/is-network-error/-/is-network-error-1.0.0.tgz",
"integrity": "sha512-P3fxi10Aji2FZmHTrMPSNFbNC6nnp4U5juPAIjXPHkUNubi4+qK7vvdsaNpAUwXslhYm9oyjEYTxs1xd/+Ph0w==",
"engines": {
"node": ">=16"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/is-number": { "node_modules/is-number": {
"version": "7.0.0", "version": "7.0.0",
"resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
@@ -3098,6 +3114,22 @@
"url": "https://github.com/sponsors/sindresorhus" "url": "https://github.com/sponsors/sindresorhus"
} }
}, },
"node_modules/p-retry": {
"version": "6.1.0",
"resolved": "https://registry.npmjs.org/p-retry/-/p-retry-6.1.0.tgz",
"integrity": "sha512-fJLEQ2KqYBJRuaA/8cKMnqhulqNM+bpcjYtXNex2t3mOXKRYPitAJt9NacSf8XAFzcYahSAbKpobiWDSqHSh2g==",
"dependencies": {
"@types/retry": "0.12.2",
"is-network-error": "^1.0.0",
"retry": "^0.13.1"
},
"engines": {
"node": ">=16.17"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/p-timeout": { "node_modules/p-timeout": {
"version": "5.1.0", "version": "5.1.0",
"resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-5.1.0.tgz", "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-5.1.0.tgz",
@@ -3465,6 +3497,14 @@
"node": ">=8" "node": ">=8"
} }
}, },
"node_modules/retry": {
"version": "0.13.1",
"resolved": "https://registry.npmjs.org/retry/-/retry-0.13.1.tgz",
"integrity": "sha512-XQBQ3I8W1Cge0Seh+6gjj03LbmRFWuoszgK9ooCpwYIrhhoO80pfq4cUkU5DkknwfOfFteRwlZ56PYOGYyFWdg==",
"engines": {
"node": ">= 4"
}
},
"node_modules/reusify": { "node_modules/reusify": {
"version": "1.0.4", "version": "1.0.4",
"resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz",
@@ -4062,9 +4102,9 @@
} }
}, },
"node_modules/undici": { "node_modules/undici": {
"version": "5.27.0", "version": "5.28.2",
"resolved": "https://registry.npmjs.org/undici/-/undici-5.27.0.tgz", "resolved": "https://registry.npmjs.org/undici/-/undici-5.28.2.tgz",
"integrity": "sha512-l3ydWhlhOJzMVOYkymLykcRRXqbUaQriERtR70B9LzNkZ4bX52Fc8wbTDneMiwo8T+AemZXvXaTx+9o5ROxrXg==", "integrity": "sha512-wh1pHJHnUeQV5Xa8/kyQhO7WFa8M34l026L5P/+2TYiakvGy5Rdc8jWZVyG7ieht/0WgJLEd3kcU5gKx+6GC8w==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@fastify/busboy": "^2.0.0" "@fastify/busboy": "^2.0.0"
@@ -4288,9 +4328,9 @@
"integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A=="
}, },
"node_modules/yaml": { "node_modules/yaml": {
"version": "2.3.3", "version": "2.3.4",
"resolved": "https://registry.npmjs.org/yaml/-/yaml-2.3.3.tgz", "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.3.4.tgz",
"integrity": "sha512-zw0VAJxgeZ6+++/su5AFoqBbZbrEakwu+X0M5HmcwUiBL7AzcuPKjj5we4xfQLp78LkEMpD0cOnUhmgOVy3KdQ==", "integrity": "sha512-8aAvwVUSHpfEqTQ4w/KMlf3HcRdt50E5ODIQJBw1fQ5RL34xabzxtUlzTXVqc4rkZsPbvrXKWnABCD7kWSmocA==",
"dev": true, "dev": true,
"engines": { "engines": {
"node": ">= 14" "node": ">= 14"

View File

@@ -2,10 +2,10 @@
"name": "create-github-app-token", "name": "create-github-app-token",
"private": true, "private": true,
"type": "module", "type": "module",
"version": "1.5.1", "version": "1.6.1",
"description": "GitHub Action for creating a GitHub App Installation Access Token", "description": "GitHub Action for creating a GitHub App Installation Access Token",
"scripts": { "scripts": {
"build": "esbuild main.js post.js --bundle --outdir=dist --out-extension:.js=.cjs --platform=node --target=node16.16", "build": "esbuild main.js post.js --bundle --outdir=dist --out-extension:.js=.cjs --platform=node --target=node20.0.0",
"test": "c8 --100 ava tests/index.js", "test": "c8 --100 ava tests/index.js",
"coverage": "c8 report --reporter html", "coverage": "c8 report --reporter html",
"postcoverage": "open-cli coverage/index.html" "postcoverage": "open-cli coverage/index.html"
@@ -14,17 +14,18 @@
"dependencies": { "dependencies": {
"@actions/core": "^1.10.1", "@actions/core": "^1.10.1",
"@octokit/auth-app": "^6.0.1", "@octokit/auth-app": "^6.0.1",
"@octokit/request": "^8.1.4" "@octokit/request": "^8.1.6",
"p-retry": "^6.1.0"
}, },
"devDependencies": { "devDependencies": {
"ava": "^5.3.1", "ava": "^5.3.1",
"c8": "^8.0.1", "c8": "^8.0.1",
"dotenv": "^16.3.1", "dotenv": "^16.3.1",
"esbuild": "^0.19.5", "esbuild": "^0.19.8",
"execa": "^8.0.1", "execa": "^8.0.1",
"open-cli": "^7.2.0", "open-cli": "^7.2.0",
"undici": "^5.27.0", "undici": "^5.28.2",
"yaml": "^2.3.3" "yaml": "^2.3.4"
}, },
"release": { "release": {
"branches": [ "branches": [

View File

@@ -0,0 +1,39 @@
import { test } from "./main.js";
// Verify `main` retry when the GitHub API returns a 500 error.
await test((mockPool) => {
process.env.INPUT_OWNER = 'actions'
process.env.INPUT_REPOSITORIES = 'failed-repo';
const owner = process.env.INPUT_OWNER
const repo = process.env.INPUT_REPOSITORIES
const mockInstallationId = "123456";
mockPool
.intercept({
path: `/repos/${owner}/${repo}/installation`,
method: "GET",
headers: {
accept: "application/vnd.github.v3+json",
"user-agent": "actions/create-github-app-token",
// Intentionally omitting the `authorization` header, since JWT creation is not idempotent.
},
})
.reply(500, 'GitHub API not available')
mockPool
.intercept({
path: `/repos/${owner}/${repo}/installation`,
method: "GET",
headers: {
accept: "application/vnd.github.v3+json",
"user-agent": "actions/create-github-app-token",
// Intentionally omitting the `authorization` header, since JWT creation is not idempotent.
},
})
.reply(
200,
{ id: mockInstallationId },
{ headers: { "content-type": "application/json" } }
);
});

View File

@@ -0,0 +1,36 @@
import { test } from "./main.js";
// Verify `main` successfully obtains a token when the `owner` input is set (to a user), but the `repositories` input isnt set.
await test((mockPool) => {
process.env.INPUT_OWNER = "smockle";
delete process.env.INPUT_REPOSITORIES;
// Mock installation id request
const mockInstallationId = "123456";
mockPool
.intercept({
path: `/orgs/${process.env.INPUT_OWNER}/installation`,
method: "GET",
headers: {
accept: "application/vnd.github.v3+json",
"user-agent": "actions/create-github-app-token",
// Intentionally omitting the `authorization` header, since JWT creation is not idempotent.
},
})
.reply(500, 'GitHub API not available')
mockPool
.intercept({
path: `/orgs/${process.env.INPUT_OWNER}/installation`,
method: "GET",
headers: {
accept: "application/vnd.github.v3+json",
"user-agent": "actions/create-github-app-token",
// Intentionally omitting the `authorization` header, since JWT creation is not idempotent.
},
})
.reply(
200,
{ id: mockInstallationId },
{ headers: { "content-type": "application/json" } }
);
});

View File

@@ -56,6 +56,21 @@ Generated by [AVA](https://avajs.dev).
'' ''
## main-token-get-owner-set-repo-fail-response.test.js
> stderr
''
> stdout
`owner and repositories set, creating token for repositories "failed-repo" owned by "actions"␊
Failed to create token for "failed-repo" (attempt 1): GitHub API not available␊
::add-mask::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
::set-output name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a`
## main-token-get-owner-set-repo-set-to-many.test.js ## main-token-get-owner-set-repo-set-to-many.test.js
> stderr > stderr
@@ -98,6 +113,21 @@ Generated by [AVA](https://avajs.dev).
::set-output name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ ::set-output name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a` ::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a`
## main-token-get-owner-set-to-user-fail-response.test.js
> stderr
''
> stdout
`repositories not set, creating token for all repositories for given owner "smockle"␊
Failed to create token for "smockle" (attempt 1): GitHub API not available␊
::add-mask::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
::set-output name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a`
## main-token-get-owner-set-to-user-repo-unset.test.js ## main-token-get-owner-set-to-user-repo-unset.test.js
> stderr > stderr

Binary file not shown.