Compare commits

...

13 Commits

Author SHA1 Message Date
semantic-release-bot 86576b355d build(release): 1.7.0 [skip ci]
# [1.7.0](https://github.com/actions/create-github-app-token/compare/v1.6.4...v1.7.0) (2024-01-26)

### Features

* `github-api-url` ([#88](https://github.com/actions/create-github-app-token/issues/88)) ([837e275](https://github.com/actions/create-github-app-token/commit/837e2752e017897b136a438ea12a06c044b8414e)), closes [#77](https://github.com/actions/create-github-app-token/issues/77)
2024-01-26 18:51:44 +00:00
Gregor Martynus 837e2752e0 feat: github-api-url (#88)
closes #77

---------

Co-authored-by: Parker Brown <17183625+parkerbxyz@users.noreply.github.com>
2024-01-26 10:51:16 -08:00
semantic-release-bot c4fa18d55c build(release): 1.6.4 [skip ci]
## [1.6.4](https://github.com/actions/create-github-app-token/compare/v1.6.3...v1.6.4) (2024-01-19)

### Bug Fixes

* **revocation:** avoid revoking expired tokens and fail gracefully ([#95](https://github.com/actions/create-github-app-token/issues/95)) ([0c01407](https://github.com/actions/create-github-app-token/commit/0c014070f93045fed9b48f568f28b2f1cca37088)), closes [#72](https://github.com/actions/create-github-app-token/issues/72)
2024-01-19 15:45:52 +00:00
Josh Gross 0c014070f9 fix(revocation): avoid revoking expired tokens and fail gracefully (#95)
Fixes #72

If an Actions job is long enough, more than an hour can pass between
creating and revoking the App token in the post-job clean up step. Since
the token itself is used to authenticate with the revoke API, an expired
token will fail to be revoked.

This PR saves the token expiration in the actions state and uses that in
the post step to determine if the token can be revoked. I've also added
error handling to the revoke token API call, as it's unlikely that users
would want their job to fail if the token can't be revoked.
2024-01-19 07:45:12 -08:00
semantic-release-bot f04aa94d10 build(release): 1.6.3 [skip ci]
## [1.6.3](https://github.com/actions/create-github-app-token/compare/v1.6.2...v1.6.3) (2024-01-09)

### Bug Fixes

* **deps:** bump the production-dependencies group with 2 updates ([#94](https://github.com/actions/create-github-app-token/issues/94)) ([323044f](https://github.com/actions/create-github-app-token/commit/323044ff3180ac0ba3543efbe2b76ff90050e9b6)), closes [#562](https://github.com/actions/create-github-app-token/issues/562) [#557](https://github.com/actions/create-github-app-token/issues/557) [#562](https://github.com/actions/create-github-app-token/issues/562) [#560](https://github.com/actions/create-github-app-token/issues/560) [#559](https://github.com/actions/create-github-app-token/issues/559) [#558](https://github.com/actions/create-github-app-token/issues/558) [#557](https://github.com/actions/create-github-app-token/issues/557) [#553](https://github.com/actions/create-github-app-token/issues/553) [#552](https://github.com/actions/create-github-app-token/issues/552) [#551](https://github.com/actions/create-github-app-token/issues/551) [#75](https://github.com/actions/create-github-app-token/issues/75) [#75](https://github.com/actions/create-github-app-token/issues/75)
2024-01-09 22:21:09 +00:00
dependabot[bot] 323044ff31 fix(deps): bump the production-dependencies group with 2 updates (#94)
Bumps the production-dependencies group with 2 updates:
[@octokit/auth-app](https://github.com/octokit/auth-app.js) and
[p-retry](https://github.com/sindresorhus/p-retry).

Updates `@octokit/auth-app` from 6.0.1 to 6.0.3
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/octokit/auth-app.js/releases"><code>@​octokit/auth-app</code>'s
releases</a>.</em></p>
<blockquote>
<h2>v6.0.3</h2>
<h2><a
href="https://github.com/octokit/auth-app.js/compare/v6.0.2...v6.0.3">6.0.3</a>
(2024-01-09)</h2>
<h3>Bug Fixes</h3>
<ul>
<li><strong>dependencies:</strong> bump universal-github-app-jwt to
1.1.2 (<a
href="https://redirect.github.com/octokit/auth-app.js/issues/562">#562</a>)
(<a
href="https://github.com/octokit/auth-app.js/commit/52346fed070b20580f2e7b6a8479d2b39a2e2c31">52346fe</a>)</li>
</ul>
<h2>v6.0.2</h2>
<h2><a
href="https://github.com/octokit/auth-app.js/compare/v6.0.1...v6.0.2">6.0.2</a>
(2023-12-18)</h2>
<h3>Bug Fixes</h3>
<ul>
<li><strong>types:</strong> update <code>Cache#get</code> to allow
<code>Promise</code> return type (<a
href="https://redirect.github.com/octokit/auth-app.js/issues/557">#557</a>)
(<a
href="https://github.com/octokit/auth-app.js/commit/f5e57aa12e6e90d92496a065cdfb70542e0190b3">f5e57aa</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/octokit/auth-app.js/commit/52346fed070b20580f2e7b6a8479d2b39a2e2c31"><code>52346fe</code></a>
fix(dependencies): bump universal-github-app-jwt to 1.1.2 (<a
href="https://redirect.github.com/octokit/auth-app.js/issues/562">#562</a>)</li>
<li><a
href="https://github.com/octokit/auth-app.js/commit/aa7d921e1dea74d1408ea96b5f5f04dd577e445e"><code>aa7d921</code></a>
build(deps): lock file maintenance (<a
href="https://redirect.github.com/octokit/auth-app.js/issues/560">#560</a>)</li>
<li><a
href="https://github.com/octokit/auth-app.js/commit/cb73ca4c3596c1320dde94182752ad4af090e9ac"><code>cb73ca4</code></a>
build(deps): lock file maintenance (<a
href="https://redirect.github.com/octokit/auth-app.js/issues/559">#559</a>)</li>
<li><a
href="https://github.com/octokit/auth-app.js/commit/5d261b118ba6ba84010fb81c0ecb1f383c3e635a"><code>5d261b1</code></a>
build(deps): lock file maintenance (<a
href="https://redirect.github.com/octokit/auth-app.js/issues/558">#558</a>)</li>
<li><a
href="https://github.com/octokit/auth-app.js/commit/f5e57aa12e6e90d92496a065cdfb70542e0190b3"><code>f5e57aa</code></a>
fix(types): update <code>Cache#get</code> to allow <code>Promise</code>
return type (<a
href="https://redirect.github.com/octokit/auth-app.js/issues/557">#557</a>)</li>
<li><a
href="https://github.com/octokit/auth-app.js/commit/5fdc2f19e08c96125d865ab235b926be096420e7"><code>5fdc2f1</code></a>
build(deps): lock file maintenance</li>
<li><a
href="https://github.com/octokit/auth-app.js/commit/dda3b52a17907a3d17fe000da9f046bd0e7258cf"><code>dda3b52</code></a>
ci(action): update github/codeql-action action to v3</li>
<li><a
href="https://github.com/octokit/auth-app.js/commit/8bbd972db1c79b9ed59099442cdb12a1e3dc8afa"><code>8bbd972</code></a>
immediate-response uses pull_request_target trigger (<a
href="https://redirect.github.com/octokit/auth-app.js/issues/553">#553</a>)</li>
<li><a
href="https://github.com/octokit/auth-app.js/commit/28cdca80d090031d52f227cba6b904ae978c9190"><code>28cdca8</code></a>
chore(deps): update dependency prettier to v3.1.1 (<a
href="https://redirect.github.com/octokit/auth-app.js/issues/552">#552</a>)</li>
<li><a
href="https://github.com/octokit/auth-app.js/commit/64eacb2776cae0f4626e92a3cda0e990a1fa2e21"><code>64eacb2</code></a>
build(deps): lock file maintenance (<a
href="https://redirect.github.com/octokit/auth-app.js/issues/551">#551</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/octokit/auth-app.js/compare/v6.0.1...v6.0.3">compare
view</a></li>
</ul>
</details>
<br />

Updates `p-retry` from 6.1.0 to 6.2.0
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/sindresorhus/p-retry/releases">p-retry's
releases</a>.</em></p>
<blockquote>
<h2>v6.2.0</h2>
<ul>
<li>Add <a
href="https://github.com/sindresorhus/p-retry#shouldretryerror"><code>shouldRetry</code></a>
option (<a
href="https://redirect.github.com/sindresorhus/p-retry/issues/75">#75</a>)
b993a96</li>
</ul>
<p><a
href="https://github.com/sindresorhus/p-retry/compare/v6.1.0...v6.2.0">https://github.com/sindresorhus/p-retry/compare/v6.1.0...v6.2.0</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/sindresorhus/p-retry/commit/21a22dd094a54e0c364ddd4bcb91c2f88e2dd03c"><code>21a22dd</code></a>
6.2.0</li>
<li><a
href="https://github.com/sindresorhus/p-retry/commit/e7d8789d43a6d8b61e88eff1181f2895add6974c"><code>e7d8789</code></a>
Meta tweaks</li>
<li><a
href="https://github.com/sindresorhus/p-retry/commit/b993a96738c52b78f54dad605a0c4df4932d4f85"><code>b993a96</code></a>
Add <code>shouldRetry</code> option (<a
href="https://redirect.github.com/sindresorhus/p-retry/issues/75">#75</a>)</li>
<li>See full diff in <a
href="https://github.com/sindresorhus/p-retry/compare/v6.1.0...v6.2.0">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>
2024-01-09 14:20:33 -08:00
dependabot[bot] 936979e9ad build(deps-dev): bump the development-dependencies group with 4 updates
Bumps the development-dependencies group with 4 updates:
[ava](https://github.com/avajs/ava),
[esbuild](https://github.com/evanw/esbuild),
[open-cli](https://github.com/sindresorhus/open-cli) and
[undici](https://github.com/nodejs/undici).

Updates `ava` from 5.3.1 to 6.0.1
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/avajs/ava/releases">ava's
releases</a>.</em></p>
<blockquote>
<h2>v6.0.1</h2>
<h2>What's Changed</h2>
<ul>
<li>Ensure watch mode works outside of its integration tests by <a
href="https://github.com/novemberborn"><code>@​novemberborn</code></a>
in <a
href="https://redirect.github.com/avajs/ava/pull/3273">avajs/ava#3273</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/avajs/ava/compare/v6.0.0...v6.0.1">https://github.com/avajs/ava/compare/v6.0.0...v6.0.1</a></p>
<h2>v6.0.0</h2>
<h2>Breaking Changes</h2>
<ul>
<li>
<p>AVA now requires Node.js versions 18.18, 20.8 or 21. Versions 14 and
16 are no longer supported. <a
href="https://redirect.github.com/avajs/ava/issues/3251">#3251</a> <a
href="https://redirect.github.com/avajs/ava/issues/3216">#3216</a></p>
</li>
<li>
<p>When tests finish, worker threads or child processes are no longer
exited through <code>proces.exit()</code>. If your test file does not
exit on its own, the test run will time out. <a
href="https://redirect.github.com/avajs/ava/issues/3260">#3260</a></p>
</li>
<li>
<p>Changes to watch mode <a
href="https://redirect.github.com/avajs/ava/issues/3218">#3218</a>:</p>
<ul>
<li>Watch mode can no longer be started via the
<code>ava.config.*</code> or <code>package.json</code>
configuration.</li>
<li>The <code>ignoredByWatcher</code> configuration has moved to the
<code>watchMode</code> object, under the <code>ignoreChanges</code>
key.</li>
<li>Watch mode now uses the built-in <a
href="https://nodejs.org/api/fs.html#fswatchfilename-options-listener"><code>fs.watch()</code></a>
in recursive mode. This is supported on Linux in Node.js 20 or newer,
and MacOS and Windows in Node.js 18 as well. There are <a
href="https://nodejs.org/api/fs.html#caveats">caveats</a> to keep in
mind.</li>
</ul>
</li>
<li>
<p>Failed assertions now throw, meaning that any subsequent code is not
executed. This also impacts the type definitions. <a
href="https://redirect.github.com/avajs/ava/issues/3246">#3246</a></p>
</li>
<li>
<p><a
href="https://nodejs.org/api/util.html#utiltypesisnativeerrorvalue">Only
native errors</a> are now considered errors by the
<code>t.throws()</code> and <code>t.throwsAsync()</code> assertions. <a
href="Object.create(https://github.com/avajs/ava/blob/HEAD/Error.prototype)"><code>Object.create(https://github.com/avajs/ava/blob/HEAD/Error.prototype)</code>
is <strong>not</strong> a native error</a>. <a
href="https://redirect.github.com/avajs/ava/issues/3229">#3229</a></p>
</li>
<li>
<p>Changes to modules loaded through the <code>require</code>
configuration <a
href="https://redirect.github.com/avajs/ava/issues/3184">#3184</a>:</p>
<ul>
<li>If such modules export a default function, this function is now
invoked.</li>
<li>Local files are loaded through <code>@ava/typescript</code> if
necessary.</li>
</ul>
</li>
</ul>
<h2>Improvements</h2>
<h3>Rewritten watcher</h3>
<p>The watcher has been rewritten. It’s now built on <a
href="https://nodejs.org/api/fs.html#fswatchfilename-options-listener"><code>fs.watch()</code></a>
in recursive mode.</p>
<p><a href="https://github.com/vercel/nft"><code>@vercel/nft</code></a>
is used to perform static dependency analysis, supporting ESM and CJS
imports for JavaScript &amp; TypeScript source files. This is a huge
improvement over the previous runtime tracking of CJS imports, which did
not support ESM.</p>
<p>Integration with <a
href="https://github.com/avajs/typescript"><code>@ava/typescript</code></a>
has been improved. The watcher can now detect a change to a TypeScript
source file, then wait for the corresponding build output to change
before re-running tests.</p>
<p>The ignoredByWatcher configuration has moved to the watchMode object,
under the ignoreChanges key.</p>
<p>See <a
href="https://redirect.github.com/avajs/ava/issues/3218">#3218</a> and
<a
href="https://redirect.github.com/avajs/ava/issues/3257">#3257</a>.</p>
<h3>Failed assertions now throw</h3>
<p>Assertions now throw a <code>TestFailure</code> error when they fail.
This error is not exported or documented and should not be used or
thrown manually. You cannot catch this error in order to recover from a
failure, use <code>t.try()</code> instead.</p>
<p>All assertions except for <code>t.throws()</code> and
<code>t.throwsAsync()</code> now return <code>true</code> when they
pass. This is useful for some of the assertions in TypeScript where they
can be used as a type guard.</p>
<p>Committing a failed <code>t.try()</code> result now also throws.</p>
<p>See <a
href="https://redirect.github.com/avajs/ava/issues/3246">#3246</a>.</p>
<h3><code>t.throws()</code> and <code>t.throwsAsync()</code> can now
expect any error</h3>
<p>By default, the thrown error (or rejection reason) must be a native
error. You can change the assertion to expect any kind of error by
setting <code>any: true</code> in the expectation object:</p>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/avajs/ava/commit/5975b602b771e0dc02382d24b65c5561bd5fc7ee"><code>5975b60</code></a>
6.0.1</li>
<li><a
href="https://github.com/avajs/ava/commit/32f282fc2163f9088803995536c2b461594e0d66"><code>32f282f</code></a>
Ensure watch mode works outside of its integration tests</li>
<li><a
href="https://github.com/avajs/ava/commit/cf7a2886bf2717cbb599d195279501be703998de"><code>cf7a288</code></a>
6.0.0</li>
<li><a
href="https://github.com/avajs/ava/commit/af5684dff58a79da862fa57fad0e946985f730a2"><code>af5684d</code></a>
Don't force-exit after tests have completed</li>
<li><a
href="https://github.com/avajs/ava/commit/88e433376a03e70ab5f9f3e7ed081f35708c99de"><code>88e4333</code></a>
Update dependencies &amp; other minor tweaks</li>
<li><a
href="https://github.com/avajs/ava/commit/cac1d1fe643865b31e42913988ca09f3d2017913"><code>cac1d1f</code></a>
Tweak README</li>
<li><a
href="https://github.com/avajs/ava/commit/0492d32863cda8aac032a45a3c29b56b47ba3b63"><code>0492d32</code></a>
Fix external assertions tests for Node.js 21</li>
<li><a
href="https://github.com/avajs/ava/commit/adbfcde981df1563a9c3ba7feb28516d00821470"><code>adbfcde</code></a>
Experimentally expose internal events for custom reporters</li>
<li><a
href="https://github.com/avajs/ava/commit/6790d50202cded442e80b1bd4316ec62ea852586"><code>6790d50</code></a>
Update memoize dependency</li>
<li><a
href="https://github.com/avajs/ava/commit/e07179bf4a238d5dd258e94f51fe92afe9dff08b"><code>e07179b</code></a>
Remove ability to select AVA 5 watcher</li>
<li>Additional commits viewable in <a
href="https://github.com/avajs/ava/compare/v5.3.1...v6.0.1">compare
view</a></li>
</ul>
</details>
<br />

Updates `esbuild` from 0.19.8 to 0.19.11
<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.11</h2>
<ul>
<li>
<p>Fix TypeScript-specific class transform edge case (<a
href="https://redirect.github.com/evanw/esbuild/issues/3559">#3559</a>)</p>
<p>The previous release introduced an optimization that avoided
transforming <code>super()</code> in the class constructor for
TypeScript code compiled with <code>useDefineForClassFields</code> set
to <code>false</code> if all class instance fields have no initializers.
The rationale was that in this case, all class instance fields are
omitted in the output so no changes to the constructor are needed.
However, if all of this is the case <em>and</em> there are
<code>#private</code> instance fields with initializers, those private
instance field initializers were still being moved into the constructor.
This was problematic because they were being inserted before the call to
<code>super()</code> (since <code>super()</code> is now no longer
transformed in that case). This release introduces an additional
optimization that avoids moving the private instance field initializers
into the constructor in this edge case, which generates smaller code,
matches the TypeScript compiler's output more closely, and avoids this
bug:</p>
<pre lang="ts"><code>// Original code
class Foo extends Bar {
  #private = 1;
  public: any;
  constructor() {
    super();
  }
}
<p>// Old output (with esbuild v0.19.9)
class Foo extends Bar {
constructor() {
super();
this.#private = 1;
}
#private;
}</p>
<p>// Old output (with esbuild v0.19.10)
class Foo extends Bar {
constructor() {
this.#private = 1;
super();
}
#private;
}</p>
<p>// New output
class Foo extends Bar {
#private = 1;
constructor() {
super();
}
}
</code></pre></p>
</li>
<li>
<p>Minifier: allow reording a primitive past a side-effect (<a
href="https://redirect.github.com/evanw/esbuild/issues/3568">#3568</a>)</p>
<p>The minifier previously allowed reordering a side-effect past a
primitive, but didn't handle the case of reordering a primitive past a
side-effect. This additional case is now handled:</p>
<pre lang="js"><code>// Original code
function f() {
  let x = false;
</code></pre>
</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.11</h2>
<ul>
<li>
<p>Fix TypeScript-specific class transform edge case (<a
href="https://redirect.github.com/evanw/esbuild/issues/3559">#3559</a>)</p>
<p>The previous release introduced an optimization that avoided
transforming <code>super()</code> in the class constructor for
TypeScript code compiled with <code>useDefineForClassFields</code> set
to <code>false</code> if all class instance fields have no initializers.
The rationale was that in this case, all class instance fields are
omitted in the output so no changes to the constructor are needed.
However, if all of this is the case <em>and</em> there are
<code>#private</code> instance fields with initializers, those private
instance field initializers were still being moved into the constructor.
This was problematic because they were being inserted before the call to
<code>super()</code> (since <code>super()</code> is now no longer
transformed in that case). This release introduces an additional
optimization that avoids moving the private instance field initializers
into the constructor in this edge case, which generates smaller code,
matches the TypeScript compiler's output more closely, and avoids this
bug:</p>
<pre lang="ts"><code>// Original code
class Foo extends Bar {
  #private = 1;
  public: any;
  constructor() {
    super();
  }
}
<p>// Old output (with esbuild v0.19.9)
class Foo extends Bar {
constructor() {
super();
this.#private = 1;
}
#private;
}</p>
<p>// Old output (with esbuild v0.19.10)
class Foo extends Bar {
constructor() {
this.#private = 1;
super();
}
#private;
}</p>
<p>// New output
class Foo extends Bar {
#private = 1;
constructor() {
super();
}
}
</code></pre></p>
</li>
<li>
<p>Minifier: allow reording a primitive past a side-effect (<a
href="https://redirect.github.com/evanw/esbuild/issues/3568">#3568</a>)</p>
<p>The minifier previously allowed reordering a side-effect past a
primitive, but didn't handle the case of reordering a primitive past a
side-effect. This additional case is now handled:</p>
<pre lang="js"><code>// Original code
function f() {
</code></pre>
</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/evanw/esbuild/commit/6ee82255bdfdffef2de60827e9d35a425a7cbff6"><code>6ee8225</code></a>
publish 0.19.11 to npm</li>
<li><a
href="https://github.com/evanw/esbuild/commit/f8ae3af32f698e0be5c159a4ab5d77324d3f44d7"><code>f8ae3af</code></a>
fix <a
href="https://redirect.github.com/evanw/esbuild/issues/3561">#3561</a>:
treeshaking of known <code>Symbol</code> instances</li>
<li><a
href="https://github.com/evanw/esbuild/commit/0811058e16e1416547ba9abbaf182916eaf259f5"><code>0811058</code></a>
switch define data to flags</li>
<li><a
href="https://github.com/evanw/esbuild/commit/f5f8ff895c4665b661ac6a49940e7bb7f012603b"><code>f5f8ff8</code></a>
fix <a
href="https://redirect.github.com/evanw/esbuild/issues/3568">#3568</a>:
can reorder primitive past side-effect</li>
<li><a
href="https://github.com/evanw/esbuild/commit/914f6080c77cfe32a54888caa51ca6ea13873ce9"><code>914f608</code></a>
fix <a
href="https://redirect.github.com/evanw/esbuild/issues/3558">#3558</a>:
put the <code>stop()</code> api call back</li>
<li><a
href="https://github.com/evanw/esbuild/commit/2aa166b623a0db059409e7ccf02ebc084fcb3abd"><code>2aa166b</code></a>
fix <a
href="https://redirect.github.com/evanw/esbuild/issues/3559">#3559</a>:
fix recent class transform regression</li>
<li><a
href="https://github.com/evanw/esbuild/commit/55e1127a49db0c26f1abd97f1b180bbc728aa95a"><code>55e1127</code></a>
publish 0.19.10 to npm</li>
<li><a
href="https://github.com/evanw/esbuild/commit/d968af29c3e11b0de0776c0648548d8e298afc02"><code>d968af2</code></a>
fix <a
href="https://redirect.github.com/evanw/esbuild/issues/3511">#3511</a>:
<code>@__NO_SIDE_EFFECTS__</code> with templates</li>
<li><a
href="https://github.com/evanw/esbuild/commit/00c4ebeb91a576dcf710b36ca8927a99efff1d37"><code>00c4ebe</code></a>
fix <a
href="https://redirect.github.com/evanw/esbuild/issues/3546">#3546</a>:
don't transform <code>require</code> glob imports</li>
<li><a
href="https://github.com/evanw/esbuild/commit/e1b7050aa074da1a0a846a01b4a3c82857128944"><code>e1b7050</code></a>
fix <a
href="https://redirect.github.com/evanw/esbuild/issues/3319">#3319</a>:
missing symbol usage in glob transform</li>
<li>Additional commits viewable in <a
href="https://github.com/evanw/esbuild/compare/v0.19.8...v0.19.11">compare
view</a></li>
</ul>
</details>
<br />

Updates `open-cli` from 7.2.0 to 8.0.0
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/sindresorhus/open-cli/releases">open-cli's
releases</a>.</em></p>
<blockquote>
<h2>v8.0.0</h2>
<h3>Breaking</h3>
<ul>
<li>Require Node.js 18  bb32fe9</li>
</ul>
<p><a
href="https://github.com/sindresorhus/open-cli/compare/v7.2.0...v8.0.0">https://github.com/sindresorhus/open-cli/compare/v7.2.0...v8.0.0</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/sindresorhus/open-cli/commit/9550e180641aa42fd7ceb15b7e43a568d10f806a"><code>9550e18</code></a>
8.0.0</li>
<li><a
href="https://github.com/sindresorhus/open-cli/commit/bb32fe985de2de228a212405f0ea4a5b8b972b84"><code>bb32fe9</code></a>
Require Node.js 18</li>
<li>See full diff in <a
href="https://github.com/sindresorhus/open-cli/compare/v7.2.0...v8.0.0">compare
view</a></li>
</ul>
</details>
<br />

Updates `undici` from 5.28.2 to 6.2.1
<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>v6.2.1</h2>
<h2>What's Changed</h2>
<ul>
<li>perf: use tree by <a
href="https://github.com/tsctx"><code>@​tsctx</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/2528">nodejs/undici#2528</a></li>
<li>chore: reduce dependencies by <a
href="https://github.com/tsctx"><code>@​tsctx</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/2533">nodejs/undici#2533</a></li>
<li>Remove timers in agent.js by <a
href="https://github.com/mcollina"><code>@​mcollina</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/2536">nodejs/undici#2536</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/nodejs/undici/compare/v6.2.0...v6.2.1">https://github.com/nodejs/undici/compare/v6.2.0...v6.2.1</a></p>
<h2>v6.2.0</h2>
<h2>What's Changed</h2>
<ul>
<li>Remove FinalizationRegistry from Agent by <a
href="https://github.com/mcollina"><code>@​mcollina</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/2530">nodejs/undici#2530</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/nodejs/undici/compare/v6.1.0...v6.2.0">https://github.com/nodejs/undici/compare/v6.1.0...v6.2.0</a></p>
<h2>v6.1.0</h2>
<h2>What's Changed</h2>
<ul>
<li>fix: more sensible stack trace from dump error by <a
href="https://github.com/ronag"><code>@​ronag</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/2503">nodejs/undici#2503</a></li>
<li>refactor: remove some node compat by <a
href="https://github.com/ronag"><code>@​ronag</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/2502">nodejs/undici#2502</a></li>
<li>refactor: version cleanup by <a
href="https://github.com/tsctx"><code>@​tsctx</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/2507">nodejs/undici#2507</a></li>
<li>perf(fetch): Improve fetch of detaurl by <a
href="https://github.com/tsctx"><code>@​tsctx</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/2479">nodejs/undici#2479</a></li>
<li>feat: expose parseHeader by <a
href="https://github.com/ronag"><code>@​ronag</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/2511">nodejs/undici#2511</a></li>
<li>perf(fetch): optimize call <code>dispatch</code> by <a
href="https://github.com/tsctx"><code>@​tsctx</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/2493">nodejs/undici#2493</a></li>
<li>perf(util/parseHeaders): If the header name is buffer by <a
href="https://github.com/tsctx"><code>@​tsctx</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/2501">nodejs/undici#2501</a></li>
<li>perf: twice faster method check by <a
href="https://github.com/tsctx"><code>@​tsctx</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/2495">nodejs/undici#2495</a></li>
<li>refactor: remove Error.captureStackTrace by <a
href="https://github.com/tsctx"><code>@​tsctx</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/2509">nodejs/undici#2509</a></li>
<li>perf: Improve processHeader by <a
href="https://github.com/tsctx"><code>@​tsctx</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/2513">nodejs/undici#2513</a></li>
<li>perf: reduce <code>String#toLowerCase</code> call by <a
href="https://github.com/tsctx"><code>@​tsctx</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/2516">nodejs/undici#2516</a></li>
<li>perf: optimize consumeEnd by <a
href="https://github.com/tsctx"><code>@​tsctx</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/2510">nodejs/undici#2510</a></li>
<li>perf: reduce tst built time by <a
href="https://github.com/tsctx"><code>@​tsctx</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/2517">nodejs/undici#2517</a></li>
<li>feat: allow customization of build environment by <a
href="https://github.com/khardix"><code>@​khardix</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/2403">nodejs/undici#2403</a></li>
<li>fix: clear cache by <a
href="https://github.com/tsctx"><code>@​tsctx</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/2519">nodejs/undici#2519</a></li>
<li>feat: Add resource timing entries for connection, request and
response by <a href="https://github.com/ToshB"><code>@​ToshB</code></a>
in <a
href="https://redirect.github.com/nodejs/undici/pull/2481">nodejs/undici#2481</a></li>
<li>Call fg.unregister() after a dispatcher is done, adds UNDICI_NO_FG
to… by <a href="https://github.com/mcollina"><code>@​mcollina</code></a>
in <a
href="https://redirect.github.com/nodejs/undici/pull/2527">nodejs/undici#2527</a></li>
<li>feat: expose headerNameToString by <a
href="https://github.com/tsctx"><code>@​tsctx</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/2525">nodejs/undici#2525</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/khardix"><code>@​khardix</code></a> made
their first contribution in <a
href="https://redirect.github.com/nodejs/undici/pull/2403">nodejs/undici#2403</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/nodejs/undici/compare/v6.0.1...v6.1.0">https://github.com/nodejs/undici/compare/v6.0.1...v6.1.0</a></p>
<h2>v6.0.1</h2>
<h2>What's Changed</h2>
<ul>
<li>fix: stream error timings by <a
href="https://github.com/ronag"><code>@​ronag</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/2497">nodejs/undici#2497</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/nodejs/undici/compare/v6.0.0...v6.0.1">https://github.com/nodejs/undici/compare/v6.0.0...v6.0.1</a></p>
<h2>v6.0.0</h2>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/nodejs/undici/commit/f51f917061aec737edfe635e52db5bccc6fc0ac6"><code>f51f917</code></a>
Bumped v6.2.1</li>
<li><a
href="https://github.com/nodejs/undici/commit/36e81319eb8920f5bccef60e172470b6dfb2734f"><code>36e8131</code></a>
Remove timers in agent.js (<a
href="https://redirect.github.com/nodejs/undici/issues/2536">#2536</a>)</li>
<li><a
href="https://github.com/nodejs/undici/commit/5f4d435cbc0ec23d4f1d4ab65d1ef965087436a7"><code>5f4d435</code></a>
chore: reduce dependencies (<a
href="https://redirect.github.com/nodejs/undici/issues/2533">#2533</a>)</li>
<li><a
href="https://github.com/nodejs/undici/commit/c5c6648a7d2097f9be4d1f7d06df9f158eff049d"><code>c5c6648</code></a>
perf: use tree (<a
href="https://redirect.github.com/nodejs/undici/issues/2528">#2528</a>)</li>
<li><a
href="https://github.com/nodejs/undici/commit/0c4c4504852c71dac1a6eb8dfae0f2411b6f2fc6"><code>0c4c450</code></a>
Bumped v6.2.0</li>
<li><a
href="https://github.com/nodejs/undici/commit/59c2f3801c2619b808313f3d8727e8defd697123"><code>59c2f38</code></a>
Remove FinalizationRegistry from Agent (<a
href="https://redirect.github.com/nodejs/undici/issues/2530">#2530</a>)</li>
<li><a
href="https://github.com/nodejs/undici/commit/250b89af0ae27b93aaacbb885e852636e2c78ce6"><code>250b89a</code></a>
Bumped v6.1.0</li>
<li><a
href="https://github.com/nodejs/undici/commit/38f2226718f8736bbb0d496f8b87618bcc78ddbc"><code>38f2226</code></a>
feat: expose headerNameToString (<a
href="https://redirect.github.com/nodejs/undici/issues/2525">#2525</a>)</li>
<li><a
href="https://github.com/nodejs/undici/commit/974a85e9d423d0d3505adb39feef15434886f809"><code>974a85e</code></a>
Call fg.unregister() after a dispatcher is done, adds UNDICI_NO_FG to…
(<a
href="https://redirect.github.com/nodejs/undici/issues/2527">#2527</a>)</li>
<li><a
href="https://github.com/nodejs/undici/commit/871baa74ec326518a3de3ee4591459e25617402e"><code>871baa7</code></a>
feat: Add resource timing entries for connection, request and response
(<a
href="https://redirect.github.com/nodejs/undici/issues/2481">#2481</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/nodejs/undici/compare/v5.28.2...v6.2.1">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>
2024-01-09 13:16:22 -08:00
semantic-release-bot 2986852ad8 build(release): 1.6.2 [skip ci]
## [1.6.2](https://github.com/actions/create-github-app-token/compare/v1.6.1...v1.6.2) (2023-12-06)

### Bug Fixes

* handle clock skew ([#87](https://github.com/actions/create-github-app-token/issues/87)) ([495056a](https://github.com/actions/create-github-app-token/commit/495056a51509f267cd7262080a7bb618ad7b5d08))
2023-12-06 20:25:58 +00:00
Bo Anderson 495056a515 fix: handle clock skew (#87)
GitHub's macOS runners for the past while have had some bad clock drift
which sometimes prevents this action from working with the error:

```console
'Issued at' claim ('iat') must be an Integer representing the time that the assertion was issued
```

`@octokit/auth-app` already has logic to handle this so we can defer to
that code.
2023-12-06 12:25:27 -08:00
Steve Russo 8746053070 docs(README): fix use of deprecated arguments (#86)
Using those fields that have an underscore (instead of a hyphen) cause
the following warnings if used:
```
Warning: Input 'app_id' has been deprecated with message: 'app_id' is deprecated and will be removed in a future version. Use 'app-id' instead.
Warning: Input 'private_key' has been deprecated with message: 'private_key' is deprecated and will be removed in a future version. Use 'private-key' instead.
```

So this PR just drops the last use of `app_id` and `private_key` from
the README in favor of `app-id` and `private-key`.
2023-12-05 09:16:54 -08:00
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](https://github.com/actions/create-github-app-token/commit/474769db88900a253a1c4aa9b4398d8a90c4cdab)), 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="https://github.com/evanw/esbuild/commit/e97bd6706c7aaddb3770ae31b164d7ccaec8056c"><code>e97bd67</code></a>
publish 0.19.8 to npm</li>
<li><a
href="https://github.com/evanw/esbuild/commit/65b305894dc8bb3bae8a2a2c88f2b461135ef13f"><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="https://github.com/evanw/esbuild/commit/16883d42eb631aac354104a80cc41446b983bdf9"><code>16883d4</code></a>
add whitespace change to release notes</li>
<li><a
href="https://github.com/evanw/esbuild/commit/7383d0dbff033ae2f954a080a77b267eede303f9"><code>7383d0d</code></a>
decorators: printing preserves newline-tail status</li>
<li><a
href="https://github.com/evanw/esbuild/commit/7edc83da67e9bf5bb217401debf0669a7011e8b8"><code>7edc83d</code></a>
reword an experimental decorators error message</li>
<li><a
href="https://github.com/evanw/esbuild/commit/f3d535262e3998d845d0f102b944ecd5a9efda57"><code>f3d5352</code></a>
remove a now-unused field</li>
<li><a
href="https://github.com/evanw/esbuild/commit/e7551893c099e101f9491e2b79851671db4cd441"><code>e755189</code></a>
ts: forbid regular decorators on <code>declare</code> fields</li>
<li><a
href="https://github.com/evanw/esbuild/commit/69c9e7f9fa91db641ecbcfad40b9fd6977522f8a"><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="https://github.com/evanw/esbuild/commit/7baefdb4ea471d453a880a18fef5217347cf9973"><code>7baefdb</code></a>
fix a panic with &quot;export default interface\n&quot;</li>
<li><a
href="https://github.com/evanw/esbuild/commit/a8313d2c5d1e7574de92b3aade60c5c84fd31c59"><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="https://github.com/nodejs/undici/commit/9a14e5f32a118fa93e769cc15ae8de9de552f2e4"><code>9a14e5f</code></a>
Bumped v5.28.2</li>
<li><a
href="https://github.com/nodejs/undici/commit/fcdfe878d792c4347b81179bc31a2d1b1f06e8fb"><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="https://github.com/nodejs/undici/commit/169c157f9a576e4422a20060f57db1dc4693b373"><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="https://github.com/nodejs/undici/commit/97881779e6ba41d2fdbfe27b5c9cc0563dc60134"><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="https://github.com/nodejs/undici/commit/1f6d1597648d332c0705befec74387631d5df9ff"><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="https://github.com/nodejs/undici/commit/a393a86d09581945ce4e601d2359023e901b2dd0"><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="https://github.com/nodejs/undici/commit/ea2f606e6b101fcbc578a407c8d4f9d10d17756e"><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="https://github.com/nodejs/undici/commit/80979edc78c458e87786e25194bc64ed0a2184b4"><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="https://github.com/nodejs/undici/commit/08183ea1d25964de9eac3b9944b0c933fe693e6f"><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="https://github.com/nodejs/undici/commit/28759f406ff808afa7a102e9e248291123ef59cb"><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="https://github.com/eemeli/yaml/commit/b7696fc001837a2e9d66ad78d7c04f47943daeca"><code>b7696fc</code></a>
2.3.4</li>
<li><a
href="https://github.com/eemeli/yaml/commit/4af74194f5e6964f0ce47aba42f9fa8a2389eb03"><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="https://github.com/octokit/request.js/commit/2554219c5bd805635b0fd3f96578c4c3e3ab988b">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="https://github.com/octokit/request.js/commit/819cc3fe0efbe7e3ee2144e12819137cbed6b1b8">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="https://github.com/octokit/request.js/commit/2554219c5bd805635b0fd3f96578c4c3e3ab988b"><code>2554219</code></a>
fix: integrate isPlainObject (<a
href="https://redirect.github.com/octokit/request.js/issues/651">#651</a>)</li>
<li><a
href="https://github.com/octokit/request.js/commit/e5d3577630804ce538b262a11cb7ebf97c663768"><code>e5d3577</code></a>
chore(deps): update dependency prettier to v3.1.0</li>
<li><a
href="https://github.com/octokit/request.js/commit/819cc3fe0efbe7e3ee2144e12819137cbed6b1b8"><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="https://github.com/octokit/request.js/commit/5c1fcdfa07f087bffe86bff3c84c9855b744de5b"><code>5c1fcdf</code></a>
chore(deps): update dependency <code>@​types/node</code> to v20</li>
<li><a
href="https://github.com/octokit/request.js/commit/9cb39bac4fe6c09aa7764a19bbc981e6fbadf995"><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="https://github.com/octokit/request.js/commit/60ed27a678a01de32eed74d9a18ff89f45fcffaf"><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
21 changed files with 1643 additions and 1910 deletions
+20 -7
View File
@@ -15,7 +15,11 @@ In order to use this action, you need to:
### Create a token for the current repository
```yaml
on: [issues]
name: Run tests on staging
on:
push:
branches:
- main
jobs:
hello-world:
@@ -26,11 +30,10 @@ jobs:
with:
app-id: ${{ vars.APP_ID }}
private-key: ${{ secrets.PRIVATE_KEY }}
- uses: peter-evans/create-or-update-comment@v3
github-api-url: "https://github.acme-inc.com/api/v3"
- uses: ./actions/staging-tests
with:
token: ${{ steps.app-token.outputs.token }}
issue-number: ${{ github.event.issue.number }}
body: "Hello, World!"
```
### Use app token with `actions/checkout`
@@ -146,7 +149,7 @@ jobs:
run: echo 'matrix=[{"owner":"owner1"},{"owner":"owner2","repos":["repo1"]}]' >>"$GITHUB_OUTPUT"
use-matrix:
name: '@${{ matrix.owners-and-repos.owner }} installation'
name: "@${{ matrix.owners-and-repos.owner }} installation"
needs: [set-matrix]
runs-on: ubuntu-latest
strategy:
@@ -157,8 +160,8 @@ jobs:
- uses: actions/create-github-app-token@v1
id: app-token
with:
app_id: ${{ vars.APP_ID }}
private_key: ${{ secrets.PRIVATE_KEY }}
app-id: ${{ vars.APP_ID }}
private-key: ${{ secrets.PRIVATE_KEY }}
owner: ${{ matrix.owners-and-repos.owner }}
repositories: ${{ join(matrix.owners-and-repos.repos) }}
- uses: octokit/request-action@v2.x
@@ -172,6 +175,12 @@ jobs:
MULTILINE_JSON_STRING: ${{ steps.get-installation-repositories.outputs.data }}
```
### Run the workflow in a github.com repository against an organization in GitHub Enterprise Server
```yaml
on: [push]
```
## Inputs
### `app-id`
@@ -197,6 +206,10 @@ jobs:
**Optional:** If truthy, the token will not be revoked when the current job is complete.
### `github-api-url`
**Optional:** The URL of the GitHub REST API. Defaults to the URL of the GitHub Rest API where the workflow is run from.
## Outputs
### `token`
+5
View File
@@ -32,6 +32,11 @@ inputs:
description: "If truthy, the token will not be revoked when the current job is complete"
required: false
deprecationMessage: "'skip_token_revoke' is deprecated and will be removed in a future version. Use 'skip-token-revoke' instead."
# Make GitHub API configurable to support non-GitHub Cloud use cases
# see https://github.com/actions/create-github-app-token/issues/77
github-api-url:
description: The URL of the GitHub REST API.
default: ${{ github.api_url }}
outputs:
token:
description: "GitHub installation access token"
+283 -271
View File
File diff suppressed because it is too large Load Diff
+165 -144
View File
@@ -34,10 +34,10 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
// node_modules/@actions/core/lib/utils.js
var require_utils = __commonJS({
"node_modules/@actions/core/lib/utils.js"(exports) {
"node_modules/@actions/core/lib/utils.js"(exports2) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.toCommandProperties = exports.toCommandValue = void 0;
Object.defineProperty(exports2, "__esModule", { value: true });
exports2.toCommandProperties = exports2.toCommandValue = void 0;
function toCommandValue(input) {
if (input === null || input === void 0) {
return "";
@@ -46,7 +46,7 @@ var require_utils = __commonJS({
}
return JSON.stringify(input);
}
exports.toCommandValue = toCommandValue;
exports2.toCommandValue = toCommandValue;
function toCommandProperties(annotationProperties) {
if (!Object.keys(annotationProperties).length) {
return {};
@@ -60,15 +60,15 @@ var require_utils = __commonJS({
endColumn: annotationProperties.endColumn
};
}
exports.toCommandProperties = toCommandProperties;
exports2.toCommandProperties = toCommandProperties;
}
});
// node_modules/@actions/core/lib/command.js
var require_command = __commonJS({
"node_modules/@actions/core/lib/command.js"(exports) {
"node_modules/@actions/core/lib/command.js"(exports2) {
"use strict";
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) {
if (k2 === void 0)
k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() {
@@ -79,12 +79,12 @@ var require_command = __commonJS({
k2 = k;
o[k2] = m[k];
});
var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? function(o, v) {
var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
} : function(o, v) {
o["default"] = v;
});
var __importStar = exports && exports.__importStar || function(mod) {
var __importStar = exports2 && exports2.__importStar || function(mod) {
if (mod && mod.__esModule)
return mod;
var result = {};
@@ -96,19 +96,19 @@ var require_command = __commonJS({
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.issue = exports.issueCommand = void 0;
Object.defineProperty(exports2, "__esModule", { value: true });
exports2.issue = exports2.issueCommand = void 0;
var os = __importStar(require("os"));
var utils_1 = require_utils();
function issueCommand(command, properties, message) {
const cmd = new Command(command, properties, message);
process.stdout.write(cmd.toString() + os.EOL);
}
exports.issueCommand = issueCommand;
exports2.issueCommand = issueCommand;
function issue(name, message = "") {
issueCommand(name, {}, message);
}
exports.issue = issue;
exports2.issue = issue;
var CMD_STRING = "::";
var Command = class {
constructor(command, properties, message) {
@@ -486,9 +486,9 @@ var init_esm_node = __esm({
// node_modules/@actions/core/lib/file-command.js
var require_file_command = __commonJS({
"node_modules/@actions/core/lib/file-command.js"(exports) {
"node_modules/@actions/core/lib/file-command.js"(exports2) {
"use strict";
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) {
if (k2 === void 0)
k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() {
@@ -499,12 +499,12 @@ var require_file_command = __commonJS({
k2 = k;
o[k2] = m[k];
});
var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? function(o, v) {
var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
} : function(o, v) {
o["default"] = v;
});
var __importStar = exports && exports.__importStar || function(mod) {
var __importStar = exports2 && exports2.__importStar || function(mod) {
if (mod && mod.__esModule)
return mod;
var result = {};
@@ -516,8 +516,8 @@ var require_file_command = __commonJS({
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.prepareKeyValueMessage = exports.issueFileCommand = void 0;
Object.defineProperty(exports2, "__esModule", { value: true });
exports2.prepareKeyValueMessage = exports2.issueFileCommand = void 0;
var fs = __importStar(require("fs"));
var os = __importStar(require("os"));
var uuid_1 = (init_esm_node(), __toCommonJS(esm_node_exports));
@@ -534,7 +534,7 @@ var require_file_command = __commonJS({
encoding: "utf8"
});
}
exports.issueFileCommand = issueFileCommand;
exports2.issueFileCommand = issueFileCommand;
function prepareKeyValueMessage(key, value) {
const delimiter = `ghadelimiter_${uuid_1.v4()}`;
const convertedValue = utils_1.toCommandValue(value);
@@ -546,16 +546,16 @@ var require_file_command = __commonJS({
}
return `${key}<<${delimiter}${os.EOL}${convertedValue}${os.EOL}${delimiter}`;
}
exports.prepareKeyValueMessage = prepareKeyValueMessage;
exports2.prepareKeyValueMessage = prepareKeyValueMessage;
}
});
// node_modules/@actions/http-client/lib/proxy.js
var require_proxy = __commonJS({
"node_modules/@actions/http-client/lib/proxy.js"(exports) {
"node_modules/@actions/http-client/lib/proxy.js"(exports2) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.checkBypass = exports.getProxyUrl = void 0;
Object.defineProperty(exports2, "__esModule", { value: true });
exports2.checkBypass = exports2.getProxyUrl = void 0;
function getProxyUrl(reqUrl) {
const usingSsl = reqUrl.protocol === "https:";
if (checkBypass(reqUrl)) {
@@ -579,7 +579,7 @@ var require_proxy = __commonJS({
return void 0;
}
}
exports.getProxyUrl = getProxyUrl;
exports2.getProxyUrl = getProxyUrl;
function checkBypass(reqUrl) {
if (!reqUrl.hostname) {
return false;
@@ -611,7 +611,7 @@ var require_proxy = __commonJS({
}
return false;
}
exports.checkBypass = checkBypass;
exports2.checkBypass = checkBypass;
function isLoopbackAddress(host) {
const hostLower = host.toLowerCase();
return hostLower === "localhost" || hostLower.startsWith("127.") || hostLower.startsWith("[::1]") || hostLower.startsWith("[0:0:0:0:0:0:0:1]");
@@ -621,7 +621,7 @@ var require_proxy = __commonJS({
// node_modules/tunnel/lib/tunnel.js
var require_tunnel = __commonJS({
"node_modules/tunnel/lib/tunnel.js"(exports) {
"node_modules/tunnel/lib/tunnel.js"(exports2) {
"use strict";
var net = require("net");
var tls = require("tls");
@@ -630,10 +630,10 @@ var require_tunnel = __commonJS({
var events = require("events");
var assert = require("assert");
var util = require("util");
exports.httpOverHttp = httpOverHttp;
exports.httpsOverHttp = httpsOverHttp;
exports.httpOverHttps = httpOverHttps;
exports.httpsOverHttps = httpsOverHttps;
exports2.httpOverHttp = httpOverHttp;
exports2.httpsOverHttp = httpsOverHttp;
exports2.httpOverHttps = httpOverHttps;
exports2.httpsOverHttps = httpsOverHttps;
function httpOverHttp(options) {
var agent = new TunnelingAgent(options);
agent.request = http.request;
@@ -845,22 +845,22 @@ var require_tunnel = __commonJS({
debug = function() {
};
}
exports.debug = debug;
exports2.debug = debug;
}
});
// node_modules/tunnel/index.js
var require_tunnel2 = __commonJS({
"node_modules/tunnel/index.js"(exports, module2) {
"node_modules/tunnel/index.js"(exports2, module2) {
module2.exports = require_tunnel();
}
});
// node_modules/@actions/http-client/lib/index.js
var require_lib = __commonJS({
"node_modules/@actions/http-client/lib/index.js"(exports) {
"node_modules/@actions/http-client/lib/index.js"(exports2) {
"use strict";
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) {
if (k2 === void 0)
k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() {
@@ -871,12 +871,12 @@ var require_lib = __commonJS({
k2 = k;
o[k2] = m[k];
});
var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? function(o, v) {
var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
} : function(o, v) {
o["default"] = v;
});
var __importStar = exports && exports.__importStar || function(mod) {
var __importStar = exports2 && exports2.__importStar || function(mod) {
if (mod && mod.__esModule)
return mod;
var result = {};
@@ -888,7 +888,7 @@ var require_lib = __commonJS({
__setModuleDefault(result, mod);
return result;
};
var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
var __awaiter = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) {
function adopt(value) {
return value instanceof P ? value : new P(function(resolve) {
resolve(value);
@@ -915,8 +915,8 @@ var require_lib = __commonJS({
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.HttpClient = exports.isHttps = exports.HttpClientResponse = exports.HttpClientError = exports.getProxyUrl = exports.MediaTypes = exports.Headers = exports.HttpCodes = void 0;
Object.defineProperty(exports2, "__esModule", { value: true });
exports2.HttpClient = exports2.isHttps = exports2.HttpClientResponse = exports2.HttpClientError = exports2.getProxyUrl = exports2.MediaTypes = exports2.Headers = exports2.HttpCodes = void 0;
var http = __importStar(require("http"));
var https = __importStar(require("https"));
var pm = __importStar(require_proxy());
@@ -950,21 +950,21 @@ var require_lib = __commonJS({
HttpCodes2[HttpCodes2["BadGateway"] = 502] = "BadGateway";
HttpCodes2[HttpCodes2["ServiceUnavailable"] = 503] = "ServiceUnavailable";
HttpCodes2[HttpCodes2["GatewayTimeout"] = 504] = "GatewayTimeout";
})(HttpCodes = exports.HttpCodes || (exports.HttpCodes = {}));
})(HttpCodes = exports2.HttpCodes || (exports2.HttpCodes = {}));
var Headers;
(function(Headers2) {
Headers2["Accept"] = "accept";
Headers2["ContentType"] = "content-type";
})(Headers = exports.Headers || (exports.Headers = {}));
})(Headers = exports2.Headers || (exports2.Headers = {}));
var MediaTypes;
(function(MediaTypes2) {
MediaTypes2["ApplicationJson"] = "application/json";
})(MediaTypes = exports.MediaTypes || (exports.MediaTypes = {}));
})(MediaTypes = exports2.MediaTypes || (exports2.MediaTypes = {}));
function getProxyUrl(serverUrl) {
const proxyUrl = pm.getProxyUrl(new URL(serverUrl));
return proxyUrl ? proxyUrl.href : "";
}
exports.getProxyUrl = getProxyUrl;
exports2.getProxyUrl = getProxyUrl;
var HttpRedirectCodes = [
HttpCodes.MovedPermanently,
HttpCodes.ResourceMoved,
@@ -988,7 +988,7 @@ var require_lib = __commonJS({
Object.setPrototypeOf(this, _HttpClientError.prototype);
}
};
exports.HttpClientError = HttpClientError;
exports2.HttpClientError = HttpClientError;
var HttpClientResponse = class {
constructor(message) {
this.message = message;
@@ -1020,12 +1020,12 @@ var require_lib = __commonJS({
});
}
};
exports.HttpClientResponse = HttpClientResponse;
exports2.HttpClientResponse = HttpClientResponse;
function isHttps(requestUrl) {
const parsedUrl = new URL(requestUrl);
return parsedUrl.protocol === "https:";
}
exports.isHttps = isHttps;
exports2.isHttps = isHttps;
var HttpClient = class {
constructor(userAgent, handlers, requestOptions) {
this._ignoreSslError = false;
@@ -1444,16 +1444,16 @@ var require_lib = __commonJS({
});
}
};
exports.HttpClient = HttpClient;
exports2.HttpClient = HttpClient;
var lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => (c[k.toLowerCase()] = obj[k], c), {});
}
});
// node_modules/@actions/http-client/lib/auth.js
var require_auth = __commonJS({
"node_modules/@actions/http-client/lib/auth.js"(exports) {
"node_modules/@actions/http-client/lib/auth.js"(exports2) {
"use strict";
var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
var __awaiter = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) {
function adopt(value) {
return value instanceof P ? value : new P(function(resolve) {
resolve(value);
@@ -1480,8 +1480,8 @@ var require_auth = __commonJS({
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.PersonalAccessTokenCredentialHandler = exports.BearerCredentialHandler = exports.BasicCredentialHandler = void 0;
Object.defineProperty(exports2, "__esModule", { value: true });
exports2.PersonalAccessTokenCredentialHandler = exports2.BearerCredentialHandler = exports2.BasicCredentialHandler = void 0;
var BasicCredentialHandler = class {
constructor(username, password) {
this.username = username;
@@ -1503,7 +1503,7 @@ var require_auth = __commonJS({
});
}
};
exports.BasicCredentialHandler = BasicCredentialHandler;
exports2.BasicCredentialHandler = BasicCredentialHandler;
var BearerCredentialHandler = class {
constructor(token) {
this.token = token;
@@ -1526,7 +1526,7 @@ var require_auth = __commonJS({
});
}
};
exports.BearerCredentialHandler = BearerCredentialHandler;
exports2.BearerCredentialHandler = BearerCredentialHandler;
var PersonalAccessTokenCredentialHandler = class {
constructor(token) {
this.token = token;
@@ -1549,15 +1549,15 @@ var require_auth = __commonJS({
});
}
};
exports.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler;
exports2.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler;
}
});
// node_modules/@actions/core/lib/oidc-utils.js
var require_oidc_utils = __commonJS({
"node_modules/@actions/core/lib/oidc-utils.js"(exports) {
"node_modules/@actions/core/lib/oidc-utils.js"(exports2) {
"use strict";
var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
var __awaiter = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) {
function adopt(value) {
return value instanceof P ? value : new P(function(resolve) {
resolve(value);
@@ -1584,8 +1584,8 @@ var require_oidc_utils = __commonJS({
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.OidcClient = void 0;
Object.defineProperty(exports2, "__esModule", { value: true });
exports2.OidcClient = void 0;
var http_client_1 = require_lib();
var auth_1 = require_auth();
var core_1 = require_core();
@@ -1647,15 +1647,15 @@ var require_oidc_utils = __commonJS({
});
}
};
exports.OidcClient = OidcClient;
exports2.OidcClient = OidcClient;
}
});
// node_modules/@actions/core/lib/summary.js
var require_summary = __commonJS({
"node_modules/@actions/core/lib/summary.js"(exports) {
"node_modules/@actions/core/lib/summary.js"(exports2) {
"use strict";
var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
var __awaiter = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) {
function adopt(value) {
return value instanceof P ? value : new P(function(resolve) {
resolve(value);
@@ -1682,13 +1682,13 @@ var require_summary = __commonJS({
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.summary = exports.markdownSummary = exports.SUMMARY_DOCS_URL = exports.SUMMARY_ENV_VAR = void 0;
Object.defineProperty(exports2, "__esModule", { value: true });
exports2.summary = exports2.markdownSummary = exports2.SUMMARY_DOCS_URL = exports2.SUMMARY_ENV_VAR = void 0;
var os_1 = require("os");
var fs_1 = require("fs");
var { access, appendFile, writeFile } = fs_1.promises;
exports.SUMMARY_ENV_VAR = "GITHUB_STEP_SUMMARY";
exports.SUMMARY_DOCS_URL = "https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary";
exports2.SUMMARY_ENV_VAR = "GITHUB_STEP_SUMMARY";
exports2.SUMMARY_DOCS_URL = "https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary";
var Summary = class {
constructor() {
this._buffer = "";
@@ -1704,9 +1704,9 @@ var require_summary = __commonJS({
if (this._filePath) {
return this._filePath;
}
const pathFromEnv = process.env[exports.SUMMARY_ENV_VAR];
const pathFromEnv = process.env[exports2.SUMMARY_ENV_VAR];
if (!pathFromEnv) {
throw new Error(`Unable to find environment variable for $${exports.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`);
throw new Error(`Unable to find environment variable for $${exports2.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`);
}
try {
yield access(pathFromEnv, fs_1.constants.R_OK | fs_1.constants.W_OK);
@@ -1940,16 +1940,16 @@ var require_summary = __commonJS({
}
};
var _summary = new Summary();
exports.markdownSummary = _summary;
exports.summary = _summary;
exports2.markdownSummary = _summary;
exports2.summary = _summary;
}
});
// node_modules/@actions/core/lib/path-utils.js
var require_path_utils = __commonJS({
"node_modules/@actions/core/lib/path-utils.js"(exports) {
"node_modules/@actions/core/lib/path-utils.js"(exports2) {
"use strict";
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) {
if (k2 === void 0)
k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() {
@@ -1960,12 +1960,12 @@ var require_path_utils = __commonJS({
k2 = k;
o[k2] = m[k];
});
var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? function(o, v) {
var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
} : function(o, v) {
o["default"] = v;
});
var __importStar = exports && exports.__importStar || function(mod) {
var __importStar = exports2 && exports2.__importStar || function(mod) {
if (mod && mod.__esModule)
return mod;
var result = {};
@@ -1977,29 +1977,29 @@ var require_path_utils = __commonJS({
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.toPlatformPath = exports.toWin32Path = exports.toPosixPath = void 0;
Object.defineProperty(exports2, "__esModule", { value: true });
exports2.toPlatformPath = exports2.toWin32Path = exports2.toPosixPath = void 0;
var path = __importStar(require("path"));
function toPosixPath(pth) {
return pth.replace(/[\\]/g, "/");
}
exports.toPosixPath = toPosixPath;
exports2.toPosixPath = toPosixPath;
function toWin32Path(pth) {
return pth.replace(/[/]/g, "\\");
}
exports.toWin32Path = toWin32Path;
exports2.toWin32Path = toWin32Path;
function toPlatformPath(pth) {
return pth.replace(/[/\\]/g, path.sep);
}
exports.toPlatformPath = toPlatformPath;
exports2.toPlatformPath = toPlatformPath;
}
});
// node_modules/@actions/core/lib/core.js
var require_core = __commonJS({
"node_modules/@actions/core/lib/core.js"(exports) {
"node_modules/@actions/core/lib/core.js"(exports2) {
"use strict";
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) {
if (k2 === void 0)
k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() {
@@ -2010,12 +2010,12 @@ var require_core = __commonJS({
k2 = k;
o[k2] = m[k];
});
var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? function(o, v) {
var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
} : function(o, v) {
o["default"] = v;
});
var __importStar = exports && exports.__importStar || function(mod) {
var __importStar = exports2 && exports2.__importStar || function(mod) {
if (mod && mod.__esModule)
return mod;
var result = {};
@@ -2027,7 +2027,7 @@ var require_core = __commonJS({
__setModuleDefault(result, mod);
return result;
};
var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
var __awaiter = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) {
function adopt(value) {
return value instanceof P ? value : new P(function(resolve) {
resolve(value);
@@ -2054,8 +2054,8 @@ var require_core = __commonJS({
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.getIDToken = exports.getState = exports.saveState = exports.group = exports.endGroup = exports.startGroup = exports.info = exports.notice = exports.warning = exports.error = exports.debug = exports.isDebug = exports.setFailed = exports.setCommandEcho = exports.setOutput = exports.getBooleanInput = exports.getMultilineInput = exports.getInput = exports.addPath = exports.setSecret = exports.exportVariable = exports.ExitCode = void 0;
Object.defineProperty(exports2, "__esModule", { value: true });
exports2.getIDToken = exports2.getState = exports2.saveState = exports2.group = exports2.endGroup = exports2.startGroup = exports2.info = exports2.notice = exports2.warning = exports2.error = exports2.debug = exports2.isDebug = exports2.setFailed = exports2.setCommandEcho = exports2.setOutput = exports2.getBooleanInput = exports2.getMultilineInput = exports2.getInput = exports2.addPath = exports2.setSecret = exports2.exportVariable = exports2.ExitCode = void 0;
var command_1 = require_command();
var file_command_1 = require_file_command();
var utils_1 = require_utils();
@@ -2066,7 +2066,7 @@ var require_core = __commonJS({
(function(ExitCode2) {
ExitCode2[ExitCode2["Success"] = 0] = "Success";
ExitCode2[ExitCode2["Failure"] = 1] = "Failure";
})(ExitCode = exports.ExitCode || (exports.ExitCode = {}));
})(ExitCode = exports2.ExitCode || (exports2.ExitCode = {}));
function exportVariable(name, val) {
const convertedVal = utils_1.toCommandValue(val);
process.env[name] = convertedVal;
@@ -2076,11 +2076,11 @@ var require_core = __commonJS({
}
command_1.issueCommand("set-env", { name }, convertedVal);
}
exports.exportVariable = exportVariable;
exports2.exportVariable = exportVariable;
function setSecret(secret) {
command_1.issueCommand("add-mask", {}, secret);
}
exports.setSecret = setSecret;
exports2.setSecret = setSecret;
function addPath(inputPath) {
const filePath = process.env["GITHUB_PATH"] || "";
if (filePath) {
@@ -2090,7 +2090,7 @@ var require_core = __commonJS({
}
process.env["PATH"] = `${inputPath}${path.delimiter}${process.env["PATH"]}`;
}
exports.addPath = addPath;
exports2.addPath = addPath;
function getInput(name, options) {
const val = process.env[`INPUT_${name.replace(/ /g, "_").toUpperCase()}`] || "";
if (options && options.required && !val) {
@@ -2101,7 +2101,7 @@ var require_core = __commonJS({
}
return val.trim();
}
exports.getInput = getInput;
exports2.getInput = getInput;
function getMultilineInput(name, options) {
const inputs = getInput(name, options).split("\n").filter((x) => x !== "");
if (options && options.trimWhitespace === false) {
@@ -2109,7 +2109,7 @@ var require_core = __commonJS({
}
return inputs.map((input) => input.trim());
}
exports.getMultilineInput = getMultilineInput;
exports2.getMultilineInput = getMultilineInput;
function getBooleanInput(name, options) {
const trueValue = ["true", "True", "TRUE"];
const falseValue = ["false", "False", "FALSE"];
@@ -2121,7 +2121,7 @@ var require_core = __commonJS({
throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${name}
Support boolean input list: \`true | True | TRUE | false | False | FALSE\``);
}
exports.getBooleanInput = getBooleanInput;
exports2.getBooleanInput = getBooleanInput;
function setOutput(name, value) {
const filePath = process.env["GITHUB_OUTPUT"] || "";
if (filePath) {
@@ -2130,48 +2130,48 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``);
process.stdout.write(os.EOL);
command_1.issueCommand("set-output", { name }, utils_1.toCommandValue(value));
}
exports.setOutput = setOutput;
exports2.setOutput = setOutput;
function setCommandEcho(enabled) {
command_1.issue("echo", enabled ? "on" : "off");
}
exports.setCommandEcho = setCommandEcho;
exports2.setCommandEcho = setCommandEcho;
function setFailed(message) {
process.exitCode = ExitCode.Failure;
error(message);
}
exports.setFailed = setFailed;
exports2.setFailed = setFailed;
function isDebug() {
return process.env["RUNNER_DEBUG"] === "1";
}
exports.isDebug = isDebug;
exports2.isDebug = isDebug;
function debug(message) {
command_1.issueCommand("debug", {}, message);
}
exports.debug = debug;
exports2.debug = debug;
function error(message, properties = {}) {
command_1.issueCommand("error", utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message);
}
exports.error = error;
exports2.error = error;
function warning(message, properties = {}) {
command_1.issueCommand("warning", utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message);
}
exports.warning = warning;
exports2.warning = warning;
function notice(message, properties = {}) {
command_1.issueCommand("notice", utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message);
}
exports.notice = notice;
exports2.notice = notice;
function info(message) {
process.stdout.write(message + os.EOL);
}
exports.info = info;
exports2.info = info;
function startGroup(name) {
command_1.issue("group", name);
}
exports.startGroup = startGroup;
exports2.startGroup = startGroup;
function endGroup() {
command_1.issue("endgroup");
}
exports.endGroup = endGroup;
exports2.endGroup = endGroup;
function group(name, fn) {
return __awaiter(this, void 0, void 0, function* () {
startGroup(name);
@@ -2184,7 +2184,7 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``);
return result;
});
}
exports.group = group;
exports2.group = group;
function saveState(name, value) {
const filePath = process.env["GITHUB_STATE"] || "";
if (filePath) {
@@ -2192,33 +2192,33 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``);
}
command_1.issueCommand("save-state", { name }, utils_1.toCommandValue(value));
}
exports.saveState = saveState;
exports2.saveState = saveState;
function getState(name) {
return process.env[`STATE_${name}`] || "";
}
exports.getState = getState;
exports2.getState = getState;
function getIDToken(aud) {
return __awaiter(this, void 0, void 0, function* () {
return yield oidc_utils_1.OidcClient.getIDToken(aud);
});
}
exports.getIDToken = getIDToken;
exports2.getIDToken = getIDToken;
var summary_1 = require_summary();
Object.defineProperty(exports, "summary", { enumerable: true, get: function() {
Object.defineProperty(exports2, "summary", { enumerable: true, get: function() {
return summary_1.summary;
} });
var summary_2 = require_summary();
Object.defineProperty(exports, "markdownSummary", { enumerable: true, get: function() {
Object.defineProperty(exports2, "markdownSummary", { enumerable: true, get: function() {
return summary_2.markdownSummary;
} });
var path_utils_1 = require_path_utils();
Object.defineProperty(exports, "toPosixPath", { enumerable: true, get: function() {
Object.defineProperty(exports2, "toPosixPath", { enumerable: true, get: function() {
return path_utils_1.toPosixPath;
} });
Object.defineProperty(exports, "toWin32Path", { enumerable: true, get: function() {
Object.defineProperty(exports2, "toWin32Path", { enumerable: true, get: function() {
return path_utils_1.toWin32Path;
} });
Object.defineProperty(exports, "toPlatformPath", { enumerable: true, get: function() {
Object.defineProperty(exports2, "toPlatformPath", { enumerable: true, get: function() {
return path_utils_1.toPlatformPath;
} });
}
@@ -2226,9 +2226,9 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``);
// node_modules/universal-user-agent/dist-node/index.js
var require_dist_node = __commonJS({
"node_modules/universal-user-agent/dist-node/index.js"(exports) {
"node_modules/universal-user-agent/dist-node/index.js"(exports2) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
Object.defineProperty(exports2, "__esModule", { value: true });
function getUserAgent() {
if (typeof navigator === "object" && "userAgent" in navigator) {
return navigator.userAgent;
@@ -2238,15 +2238,15 @@ var require_dist_node = __commonJS({
}
return "<environment undetectable>";
}
exports.getUserAgent = getUserAgent;
exports2.getUserAgent = getUserAgent;
}
});
// node_modules/is-plain-object/dist/is-plain-object.js
var require_is_plain_object = __commonJS({
"node_modules/is-plain-object/dist/is-plain-object.js"(exports) {
"node_modules/is-plain-object/dist/is-plain-object.js"(exports2) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
Object.defineProperty(exports2, "__esModule", { value: true });
function isObject(o) {
return Object.prototype.toString.call(o) === "[object Object]";
}
@@ -2265,13 +2265,13 @@ var require_is_plain_object = __commonJS({
}
return true;
}
exports.isPlainObject = isPlainObject;
exports2.isPlainObject = isPlainObject;
}
});
// node_modules/@octokit/endpoint/dist-node/index.js
var require_dist_node2 = __commonJS({
"node_modules/@octokit/endpoint/dist-node/index.js"(exports, module2) {
"node_modules/@octokit/endpoint/dist-node/index.js"(exports2, module2) {
"use strict";
var __defProp2 = Object.defineProperty;
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
@@ -2599,9 +2599,9 @@ var require_dist_node2 = __commonJS({
// node_modules/deprecation/dist-node/index.js
var require_dist_node3 = __commonJS({
"node_modules/deprecation/dist-node/index.js"(exports) {
"node_modules/deprecation/dist-node/index.js"(exports2) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
Object.defineProperty(exports2, "__esModule", { value: true });
var Deprecation = class extends Error {
constructor(message) {
super(message);
@@ -2611,13 +2611,13 @@ var require_dist_node3 = __commonJS({
this.name = "Deprecation";
}
};
exports.Deprecation = Deprecation;
exports2.Deprecation = Deprecation;
}
});
// node_modules/wrappy/wrappy.js
var require_wrappy = __commonJS({
"node_modules/wrappy/wrappy.js"(exports, module2) {
"node_modules/wrappy/wrappy.js"(exports2, module2) {
module2.exports = wrappy;
function wrappy(fn, cb) {
if (fn && cb)
@@ -2648,7 +2648,7 @@ var require_wrappy = __commonJS({
// node_modules/once/once.js
var require_once = __commonJS({
"node_modules/once/once.js"(exports, module2) {
"node_modules/once/once.js"(exports2, module2) {
var wrappy = require_wrappy();
module2.exports = wrappy(once);
module2.exports.strict = wrappy(onceStrict);
@@ -2693,7 +2693,7 @@ var require_once = __commonJS({
// node_modules/@octokit/request-error/dist-node/index.js
var require_dist_node4 = __commonJS({
"node_modules/@octokit/request-error/dist-node/index.js"(exports, module2) {
"node_modules/@octokit/request-error/dist-node/index.js"(exports2, module2) {
"use strict";
var __create2 = Object.create;
var __defProp2 = Object.defineProperty;
@@ -2785,7 +2785,7 @@ var require_dist_node4 = __commonJS({
// node_modules/@octokit/request/dist-node/index.js
var require_dist_node5 = __commonJS({
"node_modules/@octokit/request/dist-node/index.js"(exports, module2) {
"node_modules/@octokit/request/dist-node/index.js"(exports2, module2) {
"use strict";
var __defProp2 = Object.defineProperty;
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
@@ -2811,8 +2811,18 @@ var require_dist_node5 = __commonJS({
module2.exports = __toCommonJS2(dist_src_exports);
var import_endpoint = require_dist_node2();
var import_universal_user_agent = require_dist_node();
var VERSION = "8.1.4";
var import_is_plain_object = require_is_plain_object();
var VERSION = "8.1.6";
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();
function getBufferResponse(response) {
return response.arrayBuffer();
@@ -2821,7 +2831,7 @@ var require_dist_node5 = __commonJS({
var _a, _b, _c;
const log = requestOptions.request && requestOptions.request.log ? requestOptions.request.log : console;
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);
}
let headers = {};
@@ -2927,7 +2937,7 @@ var require_dist_node5 = __commonJS({
async function getResponseData(response) {
const contentType = response.headers.get("content-type");
if (/application\/json/.test(contentType)) {
return response.json();
return response.json().catch(() => response.text()).catch(() => "");
}
if (!contentType || /^text\/|charset=utf-8$/.test(contentType)) {
return response.text();
@@ -2993,30 +3003,41 @@ async function post(core2, request2) {
core2.info("Token is not set");
return;
}
await request2("DELETE /installation/token", {
headers: {
authorization: `token ${token}`
}
});
core2.info("Token revoked");
const expiresAt = core2.getState("expiresAt");
if (expiresAt && tokenExpiresIn(expiresAt) < 0) {
core2.info("Token expired, skipping token revocation");
return;
}
try {
await request2("DELETE /installation/token", {
headers: {
authorization: `token ${token}`
}
});
core2.info("Token revoked");
} catch (error) {
core2.warning(
`Token revocation failed: ${error.message}`
);
}
}
function tokenExpiresIn(expiresAt) {
const now = /* @__PURE__ */ new Date();
const expiresAtDate = new Date(expiresAt);
return Math.round((expiresAtDate.getTime() - now.getTime()) / 1e3);
}
// lib/request.js
var import_request = __toESM(require_dist_node5(), 1);
var request_default = import_request.request.defaults({
baseUrl: process.env["GITHUB_API_URL"],
headers: {
"user-agent": "actions/create-github-app-token"
}
});
// post.js
post(
import_core.default,
request_default.defaults({
baseUrl: process.env["GITHUB_API_URL"]
})
).catch((error) => {
var baseUrl = import_core.default.getInput("github-api-url").replace(/\/$/, "");
post(import_core.default, request_default.defaults({ baseUrl })).catch((error) => {
console.error(error);
import_core.default.setFailed(error.message);
});
+11 -14
View File
@@ -70,15 +70,11 @@ export async function main(
request,
});
const appAuthentication = await auth({
type: "app",
});
let authentication;
// If at least one repository is set, get installation ID from that repository
if (parsedRepositoryNames) {
authentication = await pRetry(() => getTokenFromRepository(request, auth, parsedOwner,appAuthentication, parsedRepositoryNames), {
authentication = await pRetry(() => getTokenFromRepository(request, auth, parsedOwner, parsedRepositoryNames), {
onFailedAttempt: (error) => {
core.info(
`Failed to create token for "${parsedRepositoryNames}" (attempt ${error.attemptNumber}): ${error.message}`
@@ -89,7 +85,7 @@ export async function main(
} else {
// Otherwise get the installation for the owner, which can either be an organization or a user account
authentication = await pRetry(() => getTokenFromOwner(request, auth, appAuthentication, parsedOwner), {
authentication = await pRetry(() => getTokenFromOwner(request, auth, parsedOwner), {
onFailedAttempt: (error) => {
core.info(
`Failed to create token for "${parsedOwner}" (attempt ${error.attemptNumber}): ${error.message}`
@@ -107,15 +103,16 @@ export async function main(
// Make token accessible to post function (so we can invalidate it)
if (!skipTokenRevoke) {
core.saveState("token", authentication.token);
core.setOutput("expiresAt", authentication.expiresAt);
}
}
async function getTokenFromOwner(request, auth, appAuthentication, parsedOwner) {
async function getTokenFromOwner(request, auth, 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", {
org: parsedOwner,
headers: {
authorization: `bearer ${appAuthentication.token}`,
request: {
hook: auth.hook,
},
}).catch((error) => {
/* c8 ignore next */
@@ -124,8 +121,8 @@ async function getTokenFromOwner(request, auth, appAuthentication, parsedOwner)
// https://docs.github.com/rest/apps/apps?apiVersion=2022-11-28#get-a-user-installation-for-the-authenticated-app
return request("GET /users/{username}/installation", {
username: parsedOwner,
headers: {
authorization: `bearer ${appAuthentication.token}`,
request: {
hook: auth.hook,
},
});
});
@@ -138,13 +135,13 @@ async function getTokenFromOwner(request, auth, appAuthentication, parsedOwner)
return authentication;
}
async function getTokenFromRepository(request, auth, parsedOwner,appAuthentication, parsedRepositoryNames) {
async function getTokenFromRepository(request, auth, parsedOwner, parsedRepositoryNames) {
// https://docs.github.com/rest/apps/apps?apiVersion=2022-11-28#get-a-repository-installation-for-the-authenticated-app
const response = await request("GET /repos/{owner}/{repo}/installation", {
owner: parsedOwner,
repo: parsedRepositoryNames.split(",")[0],
headers: {
authorization: `bearer ${appAuthentication.token}`,
request: {
hook: auth.hook,
},
});
+26 -6
View File
@@ -21,11 +21,31 @@ export async function post(core, request) {
return;
}
await request("DELETE /installation/token", {
headers: {
authorization: `token ${token}`,
},
});
const expiresAt = core.getState("expiresAt");
if (expiresAt && tokenExpiresIn(expiresAt) < 0) {
core.info("Token expired, skipping token revocation");
return;
}
core.info("Token revoked");
try {
await request("DELETE /installation/token", {
headers: {
authorization: `token ${token}`,
},
});
core.info("Token revoked");
} catch (error) {
core.warning(
`Token revocation failed: ${error.message}`)
}
}
/**
* @param {string} expiresAt
*/
function tokenExpiresIn(expiresAt) {
const now = new Date();
const expiresAtDate = new Date(expiresAt);
return Math.round((expiresAtDate.getTime() - now.getTime()) / 1000);
}
-1
View File
@@ -1,7 +1,6 @@
import { request } from "@octokit/request";
export default request.defaults({
baseUrl: process.env["GITHUB_API_URL"],
headers: {
"user-agent": "actions/create-github-app-token",
},
+3 -3
View File
@@ -31,6 +31,8 @@ const skipTokenRevoke = Boolean(
core.getInput("skip-token-revoke") || core.getInput("skip_token_revoke")
);
const baseUrl = core.getInput("github-api-url").replace(/\/$/, "");
main(
appId,
privateKey,
@@ -38,9 +40,7 @@ main(
repositories,
core,
createAppAuth,
request.defaults({
baseUrl: process.env["GITHUB_API_URL"],
}),
request.defaults({ baseUrl }),
skipTokenRevoke
).catch((error) => {
/* c8 ignore next 3 */
+887 -1416
View File
File diff suppressed because it is too large Load Diff
+10 -9
View File
@@ -2,7 +2,7 @@
"name": "create-github-app-token",
"private": true,
"type": "module",
"version": "1.6.0",
"version": "1.7.0",
"description": "GitHub Action for creating a GitHub App Installation Access Token",
"scripts": {
"build": "esbuild main.js post.js --bundle --outdir=dist --out-extension:.js=.cjs --platform=node --target=node20.0.0",
@@ -13,19 +13,20 @@
"license": "MIT",
"dependencies": {
"@actions/core": "^1.10.1",
"@octokit/auth-app": "^6.0.1",
"@octokit/request": "^8.1.4",
"p-retry": "^6.1.0"
"@octokit/auth-app": "^6.0.3",
"@octokit/request": "^8.1.6",
"p-retry": "^6.2.0"
},
"devDependencies": {
"ava": "^5.3.1",
"@sinonjs/fake-timers": "^11.2.2",
"ava": "^6.0.1",
"c8": "^8.0.1",
"dotenv": "^16.3.1",
"esbuild": "^0.19.5",
"esbuild": "^0.19.11",
"execa": "^8.0.1",
"open-cli": "^7.2.0",
"undici": "^5.27.0",
"yaml": "^2.3.3"
"open-cli": "^8.0.0",
"undici": "^6.2.1",
"yaml": "^2.3.4"
},
"release": {
"branches": [
+3 -6
View File
@@ -5,12 +5,9 @@ import core from "@actions/core";
import { post } from "./lib/post.js";
import request from "./lib/request.js";
post(
core,
request.defaults({
baseUrl: process.env["GITHUB_API_URL"],
})
).catch((error) => {
const baseUrl = core.getInput("github-api-url").replace(/\/$/, "");
post(core, request.defaults({ baseUrl })).catch((error) => {
/* c8 ignore next 3 */
console.error(error);
core.setFailed(error.message);
+13
View File
@@ -0,0 +1,13 @@
import { test, DEFAULT_ENV } from "./main.js";
// Verify that main works with a custom GitHub API URL passed as `github-api-url` input
await test(
() => {
process.env.INPUT_OWNER = process.env.GITHUB_REPOSITORY_OWNER;
process.env.INPUT_REPOSITORIES = process.env.GITHUB_REPOSITORY;
},
{
...DEFAULT_ENV,
"INPUT_GITHUB-API-URL": "https://github.acme-inc.com/api/v3",
}
);
+56
View File
@@ -0,0 +1,56 @@
import { test } from "./main.js";
import { install } from "@sinonjs/fake-timers";
// Verify `main` retry when the clock has drifted.
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";
install({ now: 0, toFake: ["Date"] });
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(({ headers }) => {
const [_, jwt] = (headers.authorization || "").split(" ");
const payload = JSON.parse(Buffer.from(jwt.split(".")[1], "base64").toString());
if (payload.iat < 0) {
return {
statusCode: 401,
data: {
message: "'Issued at' claim ('iat') must be an Integer representing the time that the assertion was issued."
},
responseOptions: {
headers: {
"content-type": "application/json",
"date": new Date(Date.now() + 30000).toUTCString()
}
}
};
}
return {
statusCode: 200,
data: {
id: mockInstallationId
},
responseOptions: {
headers: {
"content-type": "application/json"
}
}
};
}).times(2);
});
@@ -2,10 +2,10 @@ 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
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
@@ -18,9 +18,9 @@ await test((mockPool) => {
// Intentionally omitting the `authorization` header, since JWT creation is not idempotent.
},
})
.reply(500, 'GitHub API not available')
mockPool
.reply(500, "GitHub API not available");
mockPool
.intercept({
path: `/repos/${owner}/${repo}/installation`,
method: "GET",
@@ -35,5 +35,4 @@ await test((mockPool) => {
{ id: mockInstallationId },
{ headers: { "content-type": "application/json" } }
);
});
@@ -17,8 +17,8 @@ await test((mockPool) => {
// Intentionally omitting the `authorization` header, since JWT creation is not idempotent.
},
})
.reply(500, 'GitHub API not available')
mockPool
.reply(500, "GitHub API not available");
mockPool
.intercept({
path: `/orgs/${process.env.INPUT_OWNER}/installation`,
method: "GET",
+23 -15
View File
@@ -2,14 +2,15 @@
// @ts-check
import { MockAgent, setGlobalDispatcher } from "undici";
export async function test(cb = (_mockPool) => {}) {
// Set required environment variables and inputs
process.env.GITHUB_REPOSITORY_OWNER = "actions";
process.env.GITHUB_REPOSITORY = "actions/create-github-app-token";
export const DEFAULT_ENV = {
GITHUB_REPOSITORY_OWNER: "actions",
GITHUB_REPOSITORY: "actions/create-github-app-token",
// inputs are set as environment variables with the prefix INPUT_
// https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#example-specifying-inputs
process.env["INPUT_APP-ID"] = "123456";
process.env["INPUT_PRIVATE-KEY"] = `-----BEGIN RSA PRIVATE KEY-----
"INPUT_GITHUB-API-URL": "https://api.github.com",
"INPUT_APP-ID": "123456",
// This key is invalidated. Its from https://github.com/octokit/auth-app.js/issues/465#issuecomment-1564998327.
"INPUT_PRIVATE-KEY": `-----BEGIN RSA PRIVATE KEY-----
MIIEowIBAAKCAQEA280nfuUM9w00Ib9E2rvZJ6Qu3Ua3IqR34ZlK53vn/Iobn2EL
Z9puc5Q/nFBU15NKwHyQNb+OG2hTCkjd1Xi9XPzEOH1r42YQmTGq8YCkUSkk6KZA
5dnhLwN9pFquT9fQgrf4r1D5GJj3rqvj8JDr1sBmunArqY5u4gziSrIohcjLIZV0
@@ -35,27 +36,33 @@ r4J2gqb0xTDfq7gLMNrIXc2QQM4gKbnJp60JQM3p9NmH8huavBZGvSvNzTwXyGG3
so0tiQKBgGQXZaxaXhYUcxYHuCkQ3V4Vsj3ezlM92xXlP32SGFm3KgFhYy9kATxw
Cax1ytZzvlrKLQyQFVK1COs2rHt7W4cJ7op7C8zXfsigXCiejnS664oAuX8sQZID
x3WQZRiXlWejSMUAHuMwXrhGlltF3lw83+xAjnqsVp75kGS6OH61
-----END RSA PRIVATE KEY-----`; // This key is invalidated. Its from https://github.com/octokit/auth-app.js/issues/465#issuecomment-1564998327.
-----END RSA PRIVATE KEY-----`,
};
export async function test(cb = (_mockPool) => {}, env = DEFAULT_ENV) {
for (const [key, value] of Object.entries(env)) {
process.env[key] = value;
}
// Set up mocking
const baseUrl = new URL(env["INPUT_GITHUB-API-URL"]);
const basePath = baseUrl.pathname === '/' ? '' : baseUrl.pathname;
const mockAgent = new MockAgent();
mockAgent.disableNetConnect();
setGlobalDispatcher(mockAgent);
const mockPool = mockAgent.get("https://api.github.com");
const mockPool = mockAgent.get(baseUrl.origin);
// Calling `auth({ type: "app" })` to obtain a JWT doesnt make network requests, so no need to intercept.
// Mock installation id request
const mockInstallationId = "123456";
const owner = process.env.INPUT_OWNER ?? process.env.GITHUB_REPOSITORY_OWNER;
const owner = env.INPUT_OWNER ?? env.GITHUB_REPOSITORY_OWNER;
const repo = encodeURIComponent(
(process.env.INPUT_REPOSITORIES ?? process.env.GITHUB_REPOSITORY).split(
","
)[0]
(env.INPUT_REPOSITORIES ?? env.GITHUB_REPOSITORY).split(",")[0]
);
mockPool
.intercept({
path: `/repos/${owner}/${repo}/installation`,
path: `${basePath}/repos/${owner}/${repo}/installation`,
method: "GET",
headers: {
accept: "application/vnd.github.v3+json",
@@ -72,9 +79,10 @@ x3WQZRiXlWejSMUAHuMwXrhGlltF3lw83+xAjnqsVp75kGS6OH61
// Mock installation access token request
const mockInstallationAccessToken =
"ghs_16C7e42F292c6912E7710c838347Ae178B4a"; // This token is invalidated. Its from https://docs.github.com/en/rest/apps/apps?apiVersion=2022-11-28#create-an-installation-access-token-for-an-app.
const mockExpiresAt = "2016-07-11T22:14:10Z";
mockPool
.intercept({
path: `/app/installations/${mockInstallationId}/access_tokens`,
path: `${basePath}/app/installations/${mockInstallationId}/access_tokens`,
method: "POST",
headers: {
accept: "application/vnd.github.v3+json",
@@ -84,7 +92,7 @@ x3WQZRiXlWejSMUAHuMwXrhGlltF3lw83+xAjnqsVp75kGS6OH61
})
.reply(
201,
{ token: mockInstallationAccessToken },
{ token: mockInstallationAccessToken, expires_at: mockExpiresAt },
{ headers: { "content-type": "application/json" } }
);
@@ -0,0 +1,34 @@
import { MockAgent, setGlobalDispatcher } from "undici";
// state variables are set as environment variables with the prefix STATE_
// https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#sending-values-to-the-pre-and-post-actions
process.env.STATE_token = "secret123";
// inputs are set as environment variables with the prefix INPUT_
// https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#example-specifying-inputs
process.env["INPUT_GITHUB-API-URL"] = "https://api.github.com";
// 1 hour in the future, not expired
process.env.STATE_expiresAt = new Date(
Date.now() + 1000 * 60 * 60
).toISOString();
const mockAgent = new MockAgent();
setGlobalDispatcher(mockAgent);
// Provide the base url to the request
const mockPool = mockAgent.get("https://api.github.com");
// intercept the request
mockPool
.intercept({
path: "/installation/token",
method: "DELETE",
headers: {
authorization: "token secret123",
},
})
.reply(401);
await import("../post.js");
+28
View File
@@ -0,0 +1,28 @@
import { MockAgent, setGlobalDispatcher } from "undici";
// state variables are set as environment variables with the prefix STATE_
// https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#sending-values-to-the-pre-and-post-actions
process.env.STATE_token = "secret123";
// 1 hour in the past, expired
process.env.STATE_expiresAt = new Date(Date.now() - 1000 * 60 * 60).toISOString();
const mockAgent = new MockAgent();
setGlobalDispatcher(mockAgent);
// Provide the base url to the request
const mockPool = mockAgent.get("https://api.github.com");
// intercept the request
mockPool
.intercept({
path: "/installation/token",
method: "DELETE",
headers: {
authorization: "token secret123",
},
})
.reply(204);
await import("../post.js");
+7
View File
@@ -4,6 +4,13 @@ import { MockAgent, setGlobalDispatcher } from "undici";
// https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#sending-values-to-the-pre-and-post-actions
process.env.STATE_token = "secret123";
// inputs are set as environment variables with the prefix INPUT_
// https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#example-specifying-inputs
process.env["INPUT_GITHUB-API-URL"] = "https://api.github.com";
// 1 hour in the future, not expired
process.env.STATE_expiresAt = new Date(Date.now() + 1000 * 60 * 60).toISOString();
const mockAgent = new MockAgent();
setGlobalDispatcher(mockAgent);
+60 -8
View File
@@ -16,6 +16,22 @@ Generated by [AVA](https://avajs.dev).
private_key — 'private_key' is deprecated and will be removed in a future version. Use 'private-key' instead.␊
skip_token_revoke — 'skip_token_revoke' is deprecated and will be removed in a future version. Use 'skip-token-revoke' instead.`
## main-custom-github-api-url.test.js
> stderr
''
> stdout
`owner and repositories set, creating token for repositories "actions/create-github-app-token" owned by "actions"␊
::add-mask::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
::set-output name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
::set-output name=expiresAt::2016-07-11T22:14:10Z`
## main-missing-app-id.test.js
> stderr
@@ -69,7 +85,9 @@ Generated by [AVA](https://avajs.dev).
::add-mask::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
::set-output name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a`
::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a
::set-output name=expiresAt::2016-07-11T22:14:10Z`
## main-token-get-owner-set-repo-set-to-many.test.js
@@ -83,7 +101,9 @@ Generated by [AVA](https://avajs.dev).
::add-mask::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
::set-output name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a`
::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a
::set-output name=expiresAt::2016-07-11T22:14:10Z`
## main-token-get-owner-set-repo-set-to-one.test.js
@@ -97,7 +117,9 @@ Generated by [AVA](https://avajs.dev).
::add-mask::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
::set-output name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a`
::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a
::set-output name=expiresAt::2016-07-11T22:14:10Z`
## main-token-get-owner-set-to-org-repo-unset.test.js
@@ -111,7 +133,9 @@ Generated by [AVA](https://avajs.dev).
::add-mask::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
::set-output name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a`
::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a
::set-output name=expiresAt::2016-07-11T22:14:10Z`
## main-token-get-owner-set-to-user-fail-response.test.js
@@ -126,7 +150,9 @@ Generated by [AVA](https://avajs.dev).
::add-mask::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
::set-output name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a`
::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a
::set-output name=expiresAt::2016-07-11T22:14:10Z`
## main-token-get-owner-set-to-user-repo-unset.test.js
@@ -140,7 +166,9 @@ Generated by [AVA](https://avajs.dev).
::add-mask::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
::set-output name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a`
::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a
::set-output name=expiresAt::2016-07-11T22:14:10Z`
## main-token-get-owner-unset-repo-set.test.js
@@ -154,7 +182,9 @@ Generated by [AVA](https://avajs.dev).
::add-mask::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
::set-output name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a`
::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a
::set-output name=expiresAt::2016-07-11T22:14:10Z`
## main-token-get-owner-unset-repo-unset.test.js
@@ -168,7 +198,29 @@ Generated by [AVA](https://avajs.dev).
::add-mask::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
::set-output name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a`
::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a
::set-output name=expiresAt::2016-07-11T22:14:10Z`
## post-revoke-token-fail-response.test.js
> stderr
''
> stdout
'::warning::Token revocation failed: '
## post-token-expired.test.js
> stderr
''
> stdout
'Token expired, skipping token revocation'
## post-token-set.test.js
Binary file not shown.