Compare commits

...

8 Commits

Author SHA1 Message Date
semantic-release-bot e8e39f73bb build(release): 1.8.1 [skip ci]
## [1.8.1](https://github.com/actions/create-github-app-token/compare/v1.8.0...v1.8.1) (2024-02-21)

### Bug Fixes

* **deps:** bump undici from 6.6.0 to 6.6.1 ([#103](https://github.com/actions/create-github-app-token/issues/103)) ([5195df7](https://github.com/actions/create-github-app-token/commit/5195df7c8824728b348fbaa3f0921ce6ca4ecec0))
2024-02-21 20:37:10 +00:00
Mohammad Ismail 1e02bd5721 docs(README): add GHES workflow example (#104)
This pull request includes a significant change to the `README.md` file.
The change adds a new job to the GitHub Actions workflow, which is
designed to create an example of how to use `create-github-app-token`
action on GitHub Enterprise Server.

Resolves https://github.com/actions/create-github-app-token/issues/98

---------

Co-authored-by: Parker Brown <17183625+parkerbxyz@users.noreply.github.com>
2024-02-21 12:36:37 -08:00
dependabot[bot] 5195df7c88 fix(deps): bump undici from 6.6.0 to 6.6.1 (#103) 2024-02-16 21:43:01 +00:00
semantic-release-bot f4c6bf6752 build(release): 1.8.0 [skip ci]
# [1.8.0](https://github.com/actions/create-github-app-token/compare/v1.7.0...v1.8.0) (2024-02-08)

### Features

* add proxy support ([#102](https://github.com/actions/create-github-app-token/issues/102)) ([1f82f7d](https://github.com/actions/create-github-app-token/commit/1f82f7df931fbb9a6ba4a94ffacb46eb12eba094))
2024-02-08 23:39:37 +00:00
Parker Brown 1f82f7df93 feat: add proxy support (#102)
Adds support for the following environment variables:

- `https_proxy`
- `HTTPS_PROXY`
- `http_proxy`
- `HTTP_PROXY`
- `no_proxy`
- `NO_PROXY`
2024-02-08 15:39:04 -08:00
dependabot[bot] 1f18aabaea build(deps-dev): bump the development-dependencies group with 5 updates (#101)
Bumps the development-dependencies group with 5 updates:

| Package | From | To |
| --- | --- | --- |
| [ava](https://github.com/avajs/ava) | `6.0.1` | `6.1.1` |
| [c8](https://github.com/bcoe/c8) | `8.0.1` | `9.1.0` |
| [dotenv](https://github.com/motdotla/dotenv) | `16.3.1` | `16.4.1` |
| [esbuild](https://github.com/evanw/esbuild) | `0.19.11` | `0.20.0` |
| [undici](https://github.com/nodejs/undici) | `6.2.1` | `6.6.0` |

Updates `ava` from 6.0.1 to 6.1.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.1.1</h2>
<h2>What's Changed</h2>
<ul>
<li>Fix 'previous failures' in watch mode always incrementing by <a
href="https://github.com/novemberborn"><code>@​novemberborn</code></a>
in <a
href="https://redirect.github.com/avajs/ava/pull/3297">avajs/ava#3297</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/avajs/ava/compare/v6.1.0...v6.1.1">https://github.com/avajs/ava/compare/v6.1.0...v6.1.1</a></p>
<h2>v6.1.0</h2>
<h2>What's Changed</h2>
<ul>
<li>
<p>Implement <code>registerCompletionHandler()</code> by <a
href="https://github.com/novemberborn"><code>@​novemberborn</code></a>
in <a
href="https://redirect.github.com/avajs/ava/pull/3283">avajs/ava#3283</a></p>
<p>AVA 6 expects test code to clean up gracefully when the tests are
complete, allowing the test environment (worker thread or child process)
to exit. If this does not happen, AVA will report a timeout. You can use
<code>registerCompletionHandler()</code> to perform any other clean up
(or indeed exit the process) after AVA has completed the test execution.
See <a
href="https://github.com/avajs/ava/blob/main/docs/08-common-pitfalls.md#timeouts-because-a-file-failed-to-exit">the
description here</a>.</p>
</li>
<li>
<p>Fix potential bug with watch mode when no failed test files are
written by <a
href="https://github.com/novemberborn"><code>@​novemberborn</code></a>
in <a
href="https://redirect.github.com/avajs/ava/pull/3287">avajs/ava#3287</a></p>
</li>
<li>
<p>Fix <code>ava/internal</code> ESM type module by <a
href="https://github.com/codetheweb"><code>@​codetheweb</code></a> in <a
href="https://redirect.github.com/avajs/ava/pull/3292">avajs/ava#3292</a></p>
</li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/avajs/ava/compare/v6.0.1...v6.1.0">https://github.com/avajs/ava/compare/v6.0.1...v6.1.0</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/avajs/ava/commit/2e0c2b1cef779e1c092eb60f0a9558bb9cf4c848"><code>2e0c2b1</code></a>
6.1.1</li>
<li><a
href="https://github.com/avajs/ava/commit/5161bf77d4cd5ae2fcfd8882177e7d4a4660a9f8"><code>5161bf7</code></a>
Update dependencies</li>
<li><a
href="https://github.com/avajs/ava/commit/15dddf3ff5407b6941cf320bcb60720ac4d24a9c"><code>15dddf3</code></a>
Fix external-assertions snapshot for Node.js 20.11</li>
<li><a
href="https://github.com/avajs/ava/commit/db0fdb2925cb71b6981316b08d843cc74ff10f4a"><code>db0fdb2</code></a>
Fix 'previous failures' in watch mode always incrementing</li>
<li><a
href="https://github.com/avajs/ava/commit/735bf4172a1618d3f843eb97a68bf454aac6a329"><code>735bf41</code></a>
Update TypeScript recipe to suggest --import flag and tsimp</li>
<li><a
href="https://github.com/avajs/ava/commit/aae39b20ba3ef80e5bedb1e5882432a3cd7c44eb"><code>aae39b2</code></a>
6.1.0</li>
<li><a
href="https://github.com/avajs/ava/commit/c3e2c72e0a99738cf4720027243de98ce5bb2d69"><code>c3e2c72</code></a>
Fix ava/internal ESM type module</li>
<li><a
href="https://github.com/avajs/ava/commit/0a050243ea13df959e6c1536b2513b5fe3557690"><code>0a05024</code></a>
Implement registerCompletionHandler()</li>
<li><a
href="https://github.com/avajs/ava/commit/cc8b8397247a843a178cf732274823b13787c1f6"><code>cc8b839</code></a>
Ensure AVA exits with code 1 after an unexpected process.exit() in a
test worker</li>
<li><a
href="https://github.com/avajs/ava/commit/35f6c86bcddcd251910775f13c52aded6bbed4e5"><code>35f6c86</code></a>
Fix potential bug with watch mode when no failed test files are
written</li>
<li>Additional commits viewable in <a
href="https://github.com/avajs/ava/compare/v6.0.1...v6.1.1">compare
view</a></li>
</ul>
</details>
<br />

Updates `c8` from 8.0.1 to 9.1.0
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/bcoe/c8/releases">c8's
releases</a>.</em></p>
<blockquote>
<h2>v9.1.0</h2>
<h2><a
href="https://github.com/bcoe/c8/compare/v9.0.0...v9.1.0">9.1.0</a>
(2024-01-11)</h2>
<h3>Features</h3>
<ul>
<li>support passing reporter options from config (<a
href="https://redirect.github.com/bcoe/c8/issues/459">#459</a>) (<a
href="https://github.com/bcoe/c8/commit/88db5db56ece1686b02af7ce3b5480653069b975">88db5db</a>)</li>
</ul>
<h3>Bug Fixes</h3>
<ul>
<li><strong>refactor:</strong> remove stale check for
createDynamicModule (<a
href="https://github.com/bcoe/c8/commit/5e18365b1507682a3d7873b17ebeb6f963b251cb">5e18365</a>)</li>
</ul>
<h2>v9.0.0</h2>
<h2><a
href="https://github.com/bcoe/c8/compare/v8.0.1...v9.0.0">9.0.0</a>
(2024-01-03)</h2>
<h3>⚠ BREAKING CHANGES</h3>
<ul>
<li><strong>build:</strong> minimum Node.js version is now 14.14.0</li>
</ul>
<h3>Features</h3>
<ul>
<li><strong>build:</strong> minimum Node.js version is now 14.14.0 (<a
href="https://github.com/bcoe/c8/commit/2cdc86bd0ac67ecf0f700212dc5f8a830ff9164f">2cdc86b</a>)</li>
<li><strong>deps:</strong> update foreground-child to promise API (<a
href="https://redirect.github.com/bcoe/c8/issues/512">#512</a>) (<a
href="https://github.com/bcoe/c8/commit/b46b6401274488db5b1027a78090257095ae4f72">b46b640</a>)</li>
<li><strong>deps:</strong> use Node.js built in rm (<a
href="https://github.com/bcoe/c8/commit/2cdc86bd0ac67ecf0f700212dc5f8a830ff9164f">2cdc86b</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/bcoe/c8/blob/main/CHANGELOG.md">c8's
changelog</a>.</em></p>
<blockquote>
<h2><a
href="https://github.com/bcoe/c8/compare/v9.0.0...v9.1.0">9.1.0</a>
(2024-01-11)</h2>
<h3>Features</h3>
<ul>
<li>support passing reporter options from config (<a
href="https://redirect.github.com/bcoe/c8/issues/459">#459</a>) (<a
href="https://github.com/bcoe/c8/commit/88db5db56ece1686b02af7ce3b5480653069b975">88db5db</a>)</li>
</ul>
<h3>Bug Fixes</h3>
<ul>
<li><strong>refactor:</strong> remove stale check for
createDynamicModule (<a
href="https://github.com/bcoe/c8/commit/5e18365b1507682a3d7873b17ebeb6f963b251cb">5e18365</a>)</li>
</ul>
<h2><a
href="https://github.com/bcoe/c8/compare/v8.0.1...v9.0.0">9.0.0</a>
(2024-01-03)</h2>
<h3>⚠ BREAKING CHANGES</h3>
<ul>
<li><strong>build:</strong> minimum Node.js version is now 14.14.0</li>
</ul>
<h3>Features</h3>
<ul>
<li><strong>build:</strong> minimum Node.js version is now 14.14.0 (<a
href="https://github.com/bcoe/c8/commit/2cdc86bd0ac67ecf0f700212dc5f8a830ff9164f">2cdc86b</a>)</li>
<li><strong>deps:</strong> update foreground-child to promise API (<a
href="https://redirect.github.com/bcoe/c8/issues/512">#512</a>) (<a
href="https://github.com/bcoe/c8/commit/b46b6401274488db5b1027a78090257095ae4f72">b46b640</a>)</li>
<li><strong>deps:</strong> use Node.js built in rm (<a
href="https://github.com/bcoe/c8/commit/2cdc86bd0ac67ecf0f700212dc5f8a830ff9164f">2cdc86b</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/bcoe/c8/commit/4ae2a4d7dea2fd861e46aa786d46f391265f21fb"><code>4ae2a4d</code></a>
chore(main): release 9.1.0 (<a
href="https://redirect.github.com/bcoe/c8/issues/513">#513</a>)</li>
<li><a
href="https://github.com/bcoe/c8/commit/88db5db56ece1686b02af7ce3b5480653069b975"><code>88db5db</code></a>
feat: support passing reporter options from config (<a
href="https://redirect.github.com/bcoe/c8/issues/459">#459</a>)</li>
<li><a
href="https://github.com/bcoe/c8/commit/5e18365b1507682a3d7873b17ebeb6f963b251cb"><code>5e18365</code></a>
fix(refactor): remove stale check for createDynamicModule</li>
<li><a
href="https://github.com/bcoe/c8/commit/128bee23366cb35106f5e163e99ca2ab33dafba6"><code>128bee2</code></a>
chore(main): release 9.0.0 (<a
href="https://redirect.github.com/bcoe/c8/issues/510">#510</a>)</li>
<li><a
href="https://github.com/bcoe/c8/commit/8724c706ef7a21877e6dad1185f09dce11ddd0d2"><code>8724c70</code></a>
chore(deps): update dependency <code>@​types/node</code> to v20 (<a
href="https://redirect.github.com/bcoe/c8/issues/496">#496</a>)</li>
<li><a
href="https://github.com/bcoe/c8/commit/66705b59557ba1e48b63172e99ef4ceb34ac1711"><code>66705b5</code></a>
chore(deps): update dependency typescript to v5 (<a
href="https://redirect.github.com/bcoe/c8/issues/458">#458</a>)</li>
<li><a
href="https://github.com/bcoe/c8/commit/b46b6401274488db5b1027a78090257095ae4f72"><code>b46b640</code></a>
feat(deps): update foreground-child to promise API (<a
href="https://redirect.github.com/bcoe/c8/issues/512">#512</a>)</li>
<li><a
href="https://github.com/bcoe/c8/commit/ef672da08d8e078bf49ea73631fb46eabf8a5dae"><code>ef672da</code></a>
test: fix snapshot (<a
href="https://redirect.github.com/bcoe/c8/issues/511">#511</a>)</li>
<li><a
href="https://github.com/bcoe/c8/commit/2cdc86bd0ac67ecf0f700212dc5f8a830ff9164f"><code>2cdc86b</code></a>
chore(deps): Remove rimraf (<a
href="https://redirect.github.com/bcoe/c8/issues/509">#509</a>)</li>
<li>See full diff in <a
href="https://github.com/bcoe/c8/compare/v8.0.1...v9.1.0">compare
view</a></li>
</ul>
</details>
<br />

Updates `dotenv` from 16.3.1 to 16.4.1
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/motdotla/dotenv/blob/master/CHANGELOG.md">dotenv's
changelog</a>.</em></p>
<blockquote>
<h2><a
href="https://github.com/motdotla/dotenv/compare/v16.4.0...v16.4.1">16.4.1</a>
(2024-01-24)</h2>
<ul>
<li>Patch support for array as <code>path</code> option <a
href="https://redirect.github.com/motdotla/dotenv/pull/797">#797</a></li>
</ul>
<h2><a
href="https://github.com/motdotla/dotenv/compare/v16.3.2...v16.4.0">16.4.0</a>
(2024-01-23)</h2>
<ul>
<li>Add <code>error.code</code> to error messages around
<code>.env.vault</code> decryption handling <a
href="https://redirect.github.com/motdotla/dotenv/pull/795">#795</a></li>
<li>Add ability to find <code>.env.vault</code> file when filename(s)
passed as an array <a
href="https://redirect.github.com/motdotla/dotenv/pull/784">#784</a></li>
</ul>
<h2><a
href="https://github.com/motdotla/dotenv/compare/v16.3.1...v16.3.2">16.3.2</a>
(2024-01-18)</h2>
<h3>Added</h3>
<ul>
<li>Add debug message when no encoding set <a
href="https://redirect.github.com/motdotla/dotenv/pull/735">#735</a></li>
</ul>
<h3>Changed</h3>
<ul>
<li>Fix output typing for <code>populate</code> <a
href="https://redirect.github.com/motdotla/dotenv/pull/792">#792</a></li>
<li>Use subarray instead of slice <a
href="https://redirect.github.com/motdotla/dotenv/pull/793">#793</a></li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/motdotla/dotenv/commit/e251ee244a77fc8f6100d0efaae87ca561f5e33a"><code>e251ee2</code></a>
16.4.1</li>
<li><a
href="https://github.com/motdotla/dotenv/commit/a7fee29bd0392fc8da039e809f833e6df0b6fd3c"><code>a7fee29</code></a>
update CHANGELOG 🪵</li>
<li><a
href="https://github.com/motdotla/dotenv/commit/579d136c2175eaac14a284e58e531e3c2d169b8c"><code>579d136</code></a>
update README</li>
<li><a
href="https://github.com/motdotla/dotenv/commit/7ea2f81a2efc97fee568bb0470a9786638f84b27"><code>7ea2f81</code></a>
Merge pull request <a
href="https://redirect.github.com/motdotla/dotenv/issues/798">#798</a>
from motdotla/fix-tests</li>
<li><a
href="https://github.com/motdotla/dotenv/commit/6b829d2551c6b90d1d7d67d46471d845083b1fff"><code>6b829d2</code></a>
demonstrate currently failing (pending) test. multiple env files should
merge</li>
<li><a
href="https://github.com/motdotla/dotenv/commit/3e2284b89d31648d89c63f696de9c7e6d5438518"><code>3e2284b</code></a>
largely remove mocking from tests except where useful</li>
<li><a
href="https://github.com/motdotla/dotenv/commit/2039c4edc6cc0b29409004e447feca61abf424ac"><code>2039c4e</code></a>
wip: fix tests</li>
<li><a
href="https://github.com/motdotla/dotenv/commit/48a6ade3bf4f1e00f61b74607ee3bc58f7b7064d"><code>48a6ade</code></a>
Merge pull request <a
href="https://redirect.github.com/motdotla/dotenv/issues/797">#797</a>
from tran-simon/master</li>
<li><a
href="https://github.com/motdotla/dotenv/commit/cfd735d7d00f01e3772a35b541b1b141fd5a5c5c"><code>cfd735d</code></a>
fix: support array for path option</li>
<li><a
href="https://github.com/motdotla/dotenv/commit/a44cb3dd00abdd77f3268be111cf9dd68e9a8e91"><code>a44cb3d</code></a>
update README</li>
<li>Additional commits viewable in <a
href="https://github.com/motdotla/dotenv/compare/v16.3.1...v16.4.1">compare
view</a></li>
</ul>
</details>
<br />

Updates `esbuild` from 0.19.11 to 0.20.0
<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.20.0</h2>
<p><strong>This release deliberately contains backwards-incompatible
changes.</strong> To avoid automatically picking up releases like this,
you should either be pinning the exact version of <code>esbuild</code>
in your <code>package.json</code> file (recommended) or be using a
version range syntax that only accepts patch upgrades such as
<code>^0.19.0</code> or <code>~0.19.0</code>. See npm's documentation
about <a
href="https://docs.npmjs.com/cli/v6/using-npm/semver/">semver</a> for
more information.</p>
<p>This time there is only one breaking change, and it only matters for
people using Deno. Deno tests that use esbuild will now fail unless you
make the change described below.</p>
<ul>
<li>
<p>Work around API deprecations in Deno 1.40.x (<a
href="https://redirect.github.com/evanw/esbuild/issues/3609">#3609</a>,
<a
href="https://redirect.github.com/evanw/esbuild/pull/3611">#3611</a>)</p>
<p><a href="https://deno.com/blog/v1.40">Deno 1.40.0</a> was just
released and introduced run-time warnings about certain APIs that
esbuild uses. With this release, esbuild will work around these run-time
warnings by using newer APIs if they are present and falling back to the
original APIs otherwise. This should avoid the warnings without breaking
compatibility with older versions of Deno.</p>
<p>Unfortunately, doing this introduces a breaking change. The newer
child process APIs lack a way to synchronously terminate esbuild's child
process, so calling <code>esbuild.stop()</code> from within a Deno test
is no longer sufficient to prevent Deno from failing a test that uses
esbuild's API (Deno fails tests that create a child process without
killing it before the test ends). To work around this, esbuild's
<code>stop()</code> function has been changed to return a promise, and
you now have to change <code>esbuild.stop()</code> to <code>await
esbuild.stop()</code> in all of your Deno tests.</p>
</li>
<li>
<p>Reorder implicit file extensions within <code>node_modules</code> (<a
href="https://redirect.github.com/evanw/esbuild/issues/3341">#3341</a>,
<a
href="https://redirect.github.com/evanw/esbuild/issues/3608">#3608</a>)</p>
<p>In <a
href="https://github.com/evanw/esbuild/releases/v0.18.0">version
0.18.0</a>, esbuild changed the behavior of implicit file extensions
within <code>node_modules</code> directories (i.e. in published
packages) to prefer <code>.js</code> over <code>.ts</code> even when the
<code>--resolve-extensions=</code> order prefers <code>.ts</code> over
<code>.js</code> (which it does by default). However, doing that also
accidentally made esbuild prefer <code>.css</code> over
<code>.ts</code>, which caused problems for people that published
packages containing both TypeScript and CSS in files with the same
name.</p>
<p>With this release, esbuild will reorder TypeScript file extensions
immediately after the last JavaScript file extensions in the implicit
file extension order instead of putting them at the end of the order.
Specifically the default implicit file extension order is
<code>.tsx,.ts,.jsx,.js,.css,.json</code> which used to become
<code>.jsx,.js,.css,.json,.tsx,.ts</code> in <code>node_modules</code>
directories. With this release it will now become
<code>.jsx,.js,.tsx,.ts,.css,.json</code> instead.</p>
<p>Why even rewrite the implicit file extension order at all? One reason
is because the <code>.js</code> file is more likely to behave correctly
than the <code>.ts</code> file. The behavior of the <code>.ts</code>
file may depend on <code>tsconfig.json</code> and the
<code>tsconfig.json</code> file may not even be published, or may use
<code>extends</code> to refer to a base <code>tsconfig.json</code> file
that wasn't published. People can get into this situation when they
forget to add all <code>.ts</code> files to their
<code>.npmignore</code> file before publishing to npm. Picking
<code>.js</code> over <code>.ts</code> helps make it more likely that
resulting bundle will behave correctly.</p>
</li>
</ul>
<h2>v0.19.12</h2>
<ul>
<li>
<p>The &quot;preserve&quot; JSX mode now preserves JSX text verbatim (<a
href="https://redirect.github.com/evanw/esbuild/issues/3605">#3605</a>)</p>
<p>The <a href="https://facebook.github.io/jsx/">JSX specification</a>
deliberately doesn't specify how JSX text is supposed to be interpreted
and there is no canonical way to interpret JSX text. Two most popular
interpretations are Babel and TypeScript. Yes <a
href="https://twitter.com/jarredsumner/status/1456118847937781764">they
are different</a> (esbuild <a
href="https://twitter.com/evanwallace/status/1456122279453208576">deliberately
follows TypeScript</a> by the way).</p>
<p>Previously esbuild normalized text to the TypeScript interpretation
when the &quot;preserve&quot; JSX mode is active. However,
&quot;preserve&quot; should arguably reproduce the original JSX text
verbatim so that whatever JSX transform runs after esbuild is free to
interpret it however it wants. So with this release, esbuild will now
pass JSX text through unmodified:</p>
<pre lang="jsx"><code>// Original code
let el =
  &lt;a href={'/'} title='&amp;apos;&amp;quot;'&gt; some text
    {foo}
      more text &lt;/a&gt;
<p>// Old output (with --loader=jsx --jsx=preserve)
let el = &lt;a href=&quot;/&quot; title={<code>'&amp;quot;</code>}&gt;
{&quot; some text&quot;}
{foo}
{&quot;more text &quot;}
&lt;/a&gt;;</p>
<p>// New output (with --loader=jsx --jsx=preserve)
let el = &lt;a href={&quot;/&quot;} title='&amp;apos;&amp;quot;'&gt;
some text
{foo}
more text &lt;/a&gt;;
</code></pre></p>
</li>
<li>
<p>Allow JSX elements as JSX attribute values</p>
<p>JSX has an obscure feature where you can use JSX elements in
attribute position without surrounding them with <code>{...}</code>. It
looks like this:</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.20.0</h2>
<p><strong>This release deliberately contains backwards-incompatible
changes.</strong> To avoid automatically picking up releases like this,
you should either be pinning the exact version of <code>esbuild</code>
in your <code>package.json</code> file (recommended) or be using a
version range syntax that only accepts patch upgrades such as
<code>^0.19.0</code> or <code>~0.19.0</code>. See npm's documentation
about <a
href="https://docs.npmjs.com/cli/v6/using-npm/semver/">semver</a> for
more information.</p>
<p>This time there is only one breaking change, and it only matters for
people using Deno. Deno tests that use esbuild will now fail unless you
make the change described below.</p>
<ul>
<li>
<p>Work around API deprecations in Deno 1.40.x (<a
href="https://redirect.github.com/evanw/esbuild/issues/3609">#3609</a>,
<a
href="https://redirect.github.com/evanw/esbuild/pull/3611">#3611</a>)</p>
<p><a href="https://deno.com/blog/v1.40">Deno 1.40.0</a> was just
released and introduced run-time warnings about certain APIs that
esbuild uses. With this release, esbuild will work around these run-time
warnings by using newer APIs if they are present and falling back to the
original APIs otherwise. This should avoid the warnings without breaking
compatibility with older versions of Deno.</p>
<p>Unfortunately, doing this introduces a breaking change. The newer
child process APIs lack a way to synchronously terminate esbuild's child
process, so calling <code>esbuild.stop()</code> from within a Deno test
is no longer sufficient to prevent Deno from failing a test that uses
esbuild's API (Deno fails tests that create a child process without
killing it before the test ends). To work around this, esbuild's
<code>stop()</code> function has been changed to return a promise, and
you now have to change <code>esbuild.stop()</code> to <code>await
esbuild.stop()</code> in all of your Deno tests.</p>
</li>
<li>
<p>Reorder implicit file extensions within <code>node_modules</code> (<a
href="https://redirect.github.com/evanw/esbuild/issues/3341">#3341</a>,
<a
href="https://redirect.github.com/evanw/esbuild/issues/3608">#3608</a>)</p>
<p>In <a
href="https://github.com/evanw/esbuild/releases/v0.18.0">version
0.18.0</a>, esbuild changed the behavior of implicit file extensions
within <code>node_modules</code> directories (i.e. in published
packages) to prefer <code>.js</code> over <code>.ts</code> even when the
<code>--resolve-extensions=</code> order prefers <code>.ts</code> over
<code>.js</code> (which it does by default). However, doing that also
accidentally made esbuild prefer <code>.css</code> over
<code>.ts</code>, which caused problems for people that published
packages containing both TypeScript and CSS in files with the same
name.</p>
<p>With this release, esbuild will reorder TypeScript file extensions
immediately after the last JavaScript file extensions in the implicit
file extension order instead of putting them at the end of the order.
Specifically the default implicit file extension order is
<code>.tsx,.ts,.jsx,.js,.css,.json</code> which used to become
<code>.jsx,.js,.css,.json,.tsx,.ts</code> in <code>node_modules</code>
directories. With this release it will now become
<code>.jsx,.js,.tsx,.ts,.css,.json</code> instead.</p>
<p>Why even rewrite the implicit file extension order at all? One reason
is because the <code>.js</code> file is more likely to behave correctly
than the <code>.ts</code> file. The behavior of the <code>.ts</code>
file may depend on <code>tsconfig.json</code> and the
<code>tsconfig.json</code> file may not even be published, or may use
<code>extends</code> to refer to a base <code>tsconfig.json</code> file
that wasn't published. People can get into this situation when they
forget to add all <code>.ts</code> files to their
<code>.npmignore</code> file before publishing to npm. Picking
<code>.js</code> over <code>.ts</code> helps make it more likely that
resulting bundle will behave correctly.</p>
</li>
</ul>
<h2>0.19.12</h2>
<ul>
<li>
<p>The &quot;preserve&quot; JSX mode now preserves JSX text verbatim (<a
href="https://redirect.github.com/evanw/esbuild/issues/3605">#3605</a>)</p>
<p>The <a href="https://facebook.github.io/jsx/">JSX specification</a>
deliberately doesn't specify how JSX text is supposed to be interpreted
and there is no canonical way to interpret JSX text. Two most popular
interpretations are Babel and TypeScript. Yes <a
href="https://twitter.com/jarredsumner/status/1456118847937781764">they
are different</a> (esbuild <a
href="https://twitter.com/evanwallace/status/1456122279453208576">deliberately
follows TypeScript</a> by the way).</p>
<p>Previously esbuild normalized text to the TypeScript interpretation
when the &quot;preserve&quot; JSX mode is active. However,
&quot;preserve&quot; should arguably reproduce the original JSX text
verbatim so that whatever JSX transform runs after esbuild is free to
interpret it however it wants. So with this release, esbuild will now
pass JSX text through unmodified:</p>
<pre lang="jsx"><code>// Original code
let el =
  &lt;a href={'/'} title='&amp;apos;&amp;quot;'&gt; some text
    {foo}
      more text &lt;/a&gt;
<p>// Old output (with --loader=jsx --jsx=preserve)
let el = &lt;a href=&quot;/&quot; title={<code>'&amp;quot;</code>}&gt;
{&quot; some text&quot;}
{foo}
{&quot;more text &quot;}
&lt;/a&gt;;</p>
<p>// New output (with --loader=jsx --jsx=preserve)
let el = &lt;a href={&quot;/&quot;} title='&amp;apos;&amp;quot;'&gt;
some text
{foo}
more text &lt;/a&gt;;
</code></pre></p>
</li>
<li>
<p>Allow JSX elements as JSX attribute values</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/2af5ccf478812d2d7226ad4435d46fbbb3419a8c"><code>2af5ccf</code></a>
publish 0.20.0 to npm</li>
<li><a
href="https://github.com/evanw/esbuild/commit/0bccf08675867c8ce6662b1ab4aae21973083d99"><code>0bccf08</code></a>
fix <a
href="https://redirect.github.com/esbuild/deno-esbuild/pull/5">esbuild/deno-esbuild#5</a></li>
<li><a
href="https://github.com/evanw/esbuild/commit/931f87db267cf86f63d940c0a77072ef45e96128"><code>931f87d</code></a>
work around api deprecations in deno 1.40.x (<a
href="https://redirect.github.com/evanw/esbuild/issues/3609">#3609</a>)
(<a
href="https://redirect.github.com/evanw/esbuild/issues/3611">#3611</a>)</li>
<li><a
href="https://github.com/evanw/esbuild/commit/22a9cf5754d402aabfe75aeda0266c3a970b0ee1"><code>22a9cf5</code></a>
fix <a
href="https://redirect.github.com/evanw/esbuild/issues/3341">#3341</a>,
fix <a
href="https://redirect.github.com/evanw/esbuild/issues/3608">#3608</a>:
sort <code>.ts</code> right after <code>.js</code></li>
<li><a
href="https://github.com/evanw/esbuild/commit/f8ec3007b68c5bfb755317e5c7051f63184c514b"><code>f8ec300</code></a>
run <code>npm pkg fix</code> as suggested by the npm cli</li>
<li><a
href="https://github.com/evanw/esbuild/commit/d7fd1ad35715cda76eb33343b7c07b275e402a2e"><code>d7fd1ad</code></a>
publish 0.19.12 to npm</li>
<li><a
href="https://github.com/evanw/esbuild/commit/e04a6900b7659146aef670e62a0d16c6f75cfd70"><code>e04a690</code></a>
fix <a
href="https://redirect.github.com/evanw/esbuild/issues/3605">#3605</a>:
print the original JSX AST unmodified</li>
<li><a
href="https://github.com/evanw/esbuild/commit/f5713992227188d137c485d27b6956c6de814b9a"><code>f571399</code></a>
allow jsx elements as jsx attribute values</li>
<li><a
href="https://github.com/evanw/esbuild/commit/a652e730ff07b9081470ef6965f3d54daa7b2aab"><code>a652e73</code></a>
run <code>make update-compat-table</code></li>
<li><a
href="https://github.com/evanw/esbuild/commit/35c0d65b9d4f29a26176404d2890d1b499634e9f"><code>35c0d65</code></a>
fix <a
href="https://redirect.github.com/evanw/esbuild/issues/3574">#3574</a>:
ts type parser bug with infer + extends</li>
<li>Additional commits viewable in <a
href="https://github.com/evanw/esbuild/compare/v0.19.11...v0.20.0">compare
view</a></li>
</ul>
</details>
<br />

Updates `undici` from 6.2.1 to 6.6.0
<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.6.0</h2>
<h2>What's Changed</h2>
<ul>
<li>add webSocket example by <a
href="https://github.com/mertcanaltin"><code>@​mertcanaltin</code></a>
in <a
href="https://redirect.github.com/nodejs/undici/pull/2626">nodejs/undici#2626</a></li>
<li>chore: remove atomic-sleep as dev dependency by <a
href="https://github.com/Uzlopak"><code>@​Uzlopak</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/2648">nodejs/undici#2648</a></li>
<li>chore: remove semver as dev dependency by <a
href="https://github.com/Uzlopak"><code>@​Uzlopak</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/2646">nodejs/undici#2646</a></li>
<li>chore: remove table as dev dependency by <a
href="https://github.com/Uzlopak"><code>@​Uzlopak</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/2649">nodejs/undici#2649</a></li>
<li>chore: remove delay as dev dependency by <a
href="https://github.com/Uzlopak"><code>@​Uzlopak</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/2647">nodejs/undici#2647</a></li>
<li>chore: reduce noise in test-logs test/issue-2349.js by <a
href="https://github.com/Uzlopak"><code>@​Uzlopak</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/2655">nodejs/undici#2655</a></li>
<li>chore: fix faketimer warning in test/request-timeout.js by <a
href="https://github.com/Uzlopak"><code>@​Uzlopak</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/2656">nodejs/undici#2656</a></li>
<li>chore: reduce noise in test logs test/client-node-max-header-size.js
by <a href="https://github.com/Uzlopak"><code>@​Uzlopak</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/2654">nodejs/undici#2654</a></li>
<li>refactor: use fromInnerResponse by <a
href="https://github.com/tsctx"><code>@​tsctx</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/2635">nodejs/undici#2635</a></li>
<li>fix: support deflate raw responses by <a
href="https://github.com/Uzlopak"><code>@​Uzlopak</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/2650">nodejs/undici#2650</a></li>
<li>Support building for externally shared js builtins by <a
href="https://github.com/mochaaP"><code>@​mochaaP</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/2643">nodejs/undici#2643</a></li>
<li>fix: typo clampAndCoarsenConnectionTimingInfo by <a
href="https://github.com/Uzlopak"><code>@​Uzlopak</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/2653">nodejs/undici#2653</a></li>
<li>chore: use 'node:'-prefix for requiring node core modules by <a
href="https://github.com/Uzlopak"><code>@​Uzlopak</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/2662">nodejs/undici#2662</a></li>
<li>build(deps-dev): bump husky from 8.0.3 to 9.0.7 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/2667">nodejs/undici#2667</a></li>
<li>build(deps-dev): bump cronometro from 1.2.0 to 2.0.2 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/2668">nodejs/undici#2668</a></li>
<li>remove timers/promises import by <a
href="https://github.com/KhafraDev"><code>@​KhafraDev</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/2665">nodejs/undici#2665</a></li>
<li>chore: fix various codesmells by <a
href="https://github.com/Uzlopak"><code>@​Uzlopak</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/2669">nodejs/undici#2669</a></li>
<li>chore: remove this alias in agent.js by <a
href="https://github.com/Uzlopak"><code>@​Uzlopak</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/2671">nodejs/undici#2671</a></li>
<li>chore: use optional chaining by <a
href="https://github.com/Uzlopak"><code>@​Uzlopak</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/2666">nodejs/undici#2666</a></li>
<li>chore: small perf improvements by <a
href="https://github.com/Uzlopak"><code>@​Uzlopak</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/2661">nodejs/undici#2661</a></li>
<li>implement spec changes from a while ago by <a
href="https://github.com/KhafraDev"><code>@​KhafraDev</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/2676">nodejs/undici#2676</a></li>
<li>websocket: fix close when no closing code is received by <a
href="https://github.com/KhafraDev"><code>@​KhafraDev</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/2680">nodejs/undici#2680</a></li>
<li>fix: make ci less flaky by <a
href="https://github.com/Uzlopak"><code>@​Uzlopak</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/2684">nodejs/undici#2684</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/mochaaP"><code>@​mochaaP</code></a> made
their first contribution in <a
href="https://redirect.github.com/nodejs/undici/pull/2643">nodejs/undici#2643</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/nodejs/undici/compare/v6.5.0...v6.6.0">https://github.com/nodejs/undici/compare/v6.5.0...v6.6.0</a></p>
<h2>v6.5.0</h2>
<h2>What's Changed</h2>
<ul>
<li>build(deps-dev): bump jsdom from 23.2.0 to 24.0.0 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/2632">nodejs/undici#2632</a></li>
<li>feat: Implement EventSource by <a
href="https://github.com/Uzlopak"><code>@​Uzlopak</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/2608">nodejs/undici#2608</a></li>
<li>fix: readable body by <a
href="https://github.com/ronag"><code>@​ronag</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/2642">nodejs/undici#2642</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/nodejs/undici/compare/v6.4.0...v6.5.0">https://github.com/nodejs/undici/compare/v6.4.0...v6.5.0</a></p>
<h2>v6.4.0</h2>
<h2>What's Changed</h2>
<ul>
<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/2605">nodejs/undici#2605</a></li>
<li>cacheStorage: separate matchAll logic by <a
href="https://github.com/KhafraDev"><code>@​KhafraDev</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/2599">nodejs/undici#2599</a></li>
<li>cleanup index by <a
href="https://github.com/KhafraDev"><code>@​KhafraDev</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/2598">nodejs/undici#2598</a></li>
<li>feat: port <code>balanced-pool</code>, <code>ca-fingerprint</code>,
<code>client-abort</code> tests to <code>node:test</code> by <a
href="https://github.com/sosukesuzuki"><code>@​sosukesuzuki</code></a>
in <a
href="https://redirect.github.com/nodejs/undici/pull/2584">nodejs/undici#2584</a></li>
<li>ci: unpin nodejs workflow version by <a
href="https://github.com/dominykas"><code>@​dominykas</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/2434">nodejs/undici#2434</a></li>
<li>test(<a
href="https://redirect.github.com/nodejs/undici/issues/2600">#2600</a>):
Flaky debug test by <a
href="https://github.com/metcoder95"><code>@​metcoder95</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/2607">nodejs/undici#2607</a></li>
<li>fix: h2 hang issue with empty body by <a
href="https://github.com/timursevimli"><code>@​timursevimli</code></a>
in <a
href="https://redirect.github.com/nodejs/undici/pull/2601">nodejs/undici#2601</a></li>
<li>Fix tests for Node.js v21 by <a
href="https://github.com/sosukesuzuki"><code>@​sosukesuzuki</code></a>
in <a
href="https://redirect.github.com/nodejs/undici/pull/2609">nodejs/undici#2609</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/fa2d2d29a46412f8fb1f1a1ecf07b73e0db66a32"><code>fa2d2d2</code></a>
Bumped v6.6.0</li>
<li><a
href="https://github.com/nodejs/undici/commit/9bcf6f867fa82ef10d8b23ecb1cc3bf1f95e4041"><code>9bcf6f8</code></a>
fix: make ci less flaky (<a
href="https://redirect.github.com/nodejs/undici/issues/2684">#2684</a>)</li>
<li><a
href="https://github.com/nodejs/undici/commit/0808a721570baaa10e6386a9e50bd34278814afe"><code>0808a72</code></a>
websocket: fix close when no closing code is received (<a
href="https://redirect.github.com/nodejs/undici/issues/2680">#2680</a>)</li>
<li><a
href="https://github.com/nodejs/undici/commit/8220e7d192449f7d7417a414931849ef6573bc65"><code>8220e7d</code></a>
implement spec changes from a while ago (<a
href="https://redirect.github.com/nodejs/undici/issues/2676">#2676</a>)</li>
<li><a
href="https://github.com/nodejs/undici/commit/f1d7ada7eb2292932065a7c9ab23569b8a6e1720"><code>f1d7ada</code></a>
chore: small perf improvements (<a
href="https://redirect.github.com/nodejs/undici/issues/2661">#2661</a>)</li>
<li><a
href="https://github.com/nodejs/undici/commit/3e37392bd425ad7f49d99f649f9783294951ffa1"><code>3e37392</code></a>
chore: use optional chaining (<a
href="https://redirect.github.com/nodejs/undici/issues/2666">#2666</a>)</li>
<li><a
href="https://github.com/nodejs/undici/commit/ee35bb0b7a92944d3572062de4e96680b6fdeb61"><code>ee35bb0</code></a>
chore: remove this alias in agent.js (<a
href="https://redirect.github.com/nodejs/undici/issues/2671">#2671</a>)</li>
<li><a
href="https://github.com/nodejs/undici/commit/82477d734df73bcfb507af9394fa165d316c1eb3"><code>82477d7</code></a>
chore: fix various codesmells (<a
href="https://redirect.github.com/nodejs/undici/issues/2669">#2669</a>)</li>
<li><a
href="https://github.com/nodejs/undici/commit/2144da490ebcdc02d2b065d0b720137e12a049bb"><code>2144da4</code></a>
remove timers/promises import (<a
href="https://redirect.github.com/nodejs/undici/issues/2665">#2665</a>)</li>
<li><a
href="https://github.com/nodejs/undici/commit/bed84897c34769c620ed43df657b2015bf221dfe"><code>bed8489</code></a>
build(deps-dev): bump cronometro from 1.2.0 to 2.0.2 (<a
href="https://redirect.github.com/nodejs/undici/issues/2668">#2668</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/nodejs/undici/compare/v6.2.1...v6.6.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-02-01 09:19:39 -08:00
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
17 changed files with 35038 additions and 271 deletions
+41 -5
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:
@@ -172,6 +175,35 @@ 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]
jobs:
create_issue:
runs-on: self-hosted
steps:
- name: Create GitHub App token
id: create_token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ vars.GHES_APP_ID }}
private-key: ${{ secrets.GHES_APP_PRIVATE_KEY }}
owner: ${{ vars.GHES_INSTALLATION_ORG }}
github-api-url: ${{ vars.GITHUB_API_URL }}
- name: Create issue
uses: octokit/request-action@v2.x
with:
route: POST /repos/${{ github.repository }}/issues
title: "New issue from workflow"
body: "This is a new issue created from a GitHub Action workflow."
env:
GITHUB_TOKEN: ${{ steps.create_token.outputs.token }}
```
## Inputs
### `app-id`
@@ -197,6 +229,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"
+17364 -37
View File
File diff suppressed because one or more lines are too long
+17352 -28
View File
File diff suppressed because one or more lines are too long
+34 -1
View File
@@ -1,8 +1,41 @@
import core from "@actions/core";
import { request } from "@octokit/request";
import { ProxyAgent, fetch as undiciFetch } from "undici";
const baseUrl = core.getInput("github-api-url").replace(/\/$/, "");
// https://docs.github.com/actions/hosting-your-own-runners/managing-self-hosted-runners/using-a-proxy-server-with-self-hosted-runners
const proxyUrl =
process.env.https_proxy ||
process.env.HTTPS_PROXY ||
process.env.http_proxy ||
process.env.HTTP_PROXY;
/* c8 ignore start */
// Native support for proxies in Undici is under consideration: https://github.com/nodejs/undici/issues/1650
// Until then, we need to use a custom fetch function to add proxy support.
const proxyFetch = (url, options) => {
const urlHost = new URL(url).hostname;
const noProxy = (process.env.no_proxy || process.env.NO_PROXY || "").split(
","
);
if (!noProxy.includes(urlHost)) {
options = {
...options,
dispatcher: new ProxyAgent(String(proxyUrl)),
};
}
return undiciFetch(url, options);
};
/* c8 ignore stop */
export default request.defaults({
baseUrl: process.env["GITHUB_API_URL"],
headers: {
"user-agent": "actions/create-github-app-token",
},
baseUrl,
/* c8 ignore next */
request: proxyUrl ? { fetch: proxyFetch } : {},
});
+1 -3
View File
@@ -38,9 +38,7 @@ main(
repositories,
core,
createAppAuth,
request.defaults({
baseUrl: process.env["GITHUB_API_URL"],
}),
request,
skipTokenRevoke
).catch((error) => {
/* c8 ignore next 3 */
+162 -158
View File
@@ -1,28 +1,28 @@
{
"name": "create-github-app-token",
"version": "1.6.2",
"version": "1.8.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "create-github-app-token",
"version": "1.6.2",
"version": "1.8.0",
"license": "MIT",
"dependencies": {
"@actions/core": "^1.10.1",
"@octokit/auth-app": "^6.0.3",
"@octokit/request": "^8.1.6",
"p-retry": "^6.2.0"
"p-retry": "^6.2.0",
"undici": "^6.6.1"
},
"devDependencies": {
"@sinonjs/fake-timers": "^11.2.2",
"ava": "^6.0.1",
"c8": "^8.0.1",
"dotenv": "^16.3.1",
"esbuild": "^0.19.11",
"ava": "^6.1.1",
"c8": "^9.1.0",
"dotenv": "^16.4.1",
"esbuild": "^0.20.0",
"execa": "^8.0.1",
"open-cli": "^8.0.0",
"undici": "^6.2.1",
"yaml": "^2.3.4"
}
},
@@ -50,9 +50,9 @@
"dev": true
},
"node_modules/@esbuild/aix-ppc64": {
"version": "0.19.11",
"resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.19.11.tgz",
"integrity": "sha512-FnzU0LyE3ySQk7UntJO4+qIiQgI7KoODnZg5xzXIrFJlKd2P2gwHsHY4927xj9y5PJmJSzULiUCWmv7iWnNa7g==",
"version": "0.20.0",
"resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.20.0.tgz",
"integrity": "sha512-fGFDEctNh0CcSwsiRPxiaqX0P5rq+AqE0SRhYGZ4PX46Lg1FNR6oCxJghf8YgY0WQEgQuh3lErUFE4KxLeRmmw==",
"cpu": [
"ppc64"
],
@@ -66,9 +66,9 @@
}
},
"node_modules/@esbuild/android-arm": {
"version": "0.19.11",
"resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.19.11.tgz",
"integrity": "sha512-5OVapq0ClabvKvQ58Bws8+wkLCV+Rxg7tUVbo9xu034Nm536QTII4YzhaFriQ7rMrorfnFKUsArD2lqKbFY4vw==",
"version": "0.20.0",
"resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.20.0.tgz",
"integrity": "sha512-3bMAfInvByLHfJwYPJRlpTeaQA75n8C/QKpEaiS4HrFWFiJlNI0vzq/zCjBrhAYcPyVPG7Eo9dMrcQXuqmNk5g==",
"cpu": [
"arm"
],
@@ -82,9 +82,9 @@
}
},
"node_modules/@esbuild/android-arm64": {
"version": "0.19.11",
"resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.19.11.tgz",
"integrity": "sha512-aiu7K/5JnLj//KOnOfEZ0D90obUkRzDMyqd/wNAUQ34m4YUPVhRZpnqKV9uqDGxT7cToSDnIHsGooyIczu9T+Q==",
"version": "0.20.0",
"resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.20.0.tgz",
"integrity": "sha512-aVpnM4lURNkp0D3qPoAzSG92VXStYmoVPOgXveAUoQBWRSuQzt51yvSju29J6AHPmwY1BjH49uR29oyfH1ra8Q==",
"cpu": [
"arm64"
],
@@ -98,9 +98,9 @@
}
},
"node_modules/@esbuild/android-x64": {
"version": "0.19.11",
"resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.19.11.tgz",
"integrity": "sha512-eccxjlfGw43WYoY9QgB82SgGgDbibcqyDTlk3l3C0jOVHKxrjdc9CTwDUQd0vkvYg5um0OH+GpxYvp39r+IPOg==",
"version": "0.20.0",
"resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.20.0.tgz",
"integrity": "sha512-uK7wAnlRvjkCPzh8jJ+QejFyrP8ObKuR5cBIsQZ+qbMunwR8sbd8krmMbxTLSrDhiPZaJYKQAU5Y3iMDcZPhyQ==",
"cpu": [
"x64"
],
@@ -114,9 +114,9 @@
}
},
"node_modules/@esbuild/darwin-arm64": {
"version": "0.19.11",
"resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.19.11.tgz",
"integrity": "sha512-ETp87DRWuSt9KdDVkqSoKoLFHYTrkyz2+65fj9nfXsaV3bMhTCjtQfw3y+um88vGRKRiF7erPrh/ZuIdLUIVxQ==",
"version": "0.20.0",
"resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.20.0.tgz",
"integrity": "sha512-AjEcivGAlPs3UAcJedMa9qYg9eSfU6FnGHJjT8s346HSKkrcWlYezGE8VaO2xKfvvlZkgAhyvl06OJOxiMgOYQ==",
"cpu": [
"arm64"
],
@@ -130,9 +130,9 @@
}
},
"node_modules/@esbuild/darwin-x64": {
"version": "0.19.11",
"resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.19.11.tgz",
"integrity": "sha512-fkFUiS6IUK9WYUO/+22omwetaSNl5/A8giXvQlcinLIjVkxwTLSktbF5f/kJMftM2MJp9+fXqZ5ezS7+SALp4g==",
"version": "0.20.0",
"resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.20.0.tgz",
"integrity": "sha512-bsgTPoyYDnPv8ER0HqnJggXK6RyFy4PH4rtsId0V7Efa90u2+EifxytE9pZnsDgExgkARy24WUQGv9irVbTvIw==",
"cpu": [
"x64"
],
@@ -146,9 +146,9 @@
}
},
"node_modules/@esbuild/freebsd-arm64": {
"version": "0.19.11",
"resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.19.11.tgz",
"integrity": "sha512-lhoSp5K6bxKRNdXUtHoNc5HhbXVCS8V0iZmDvyWvYq9S5WSfTIHU2UGjcGt7UeS6iEYp9eeymIl5mJBn0yiuxA==",
"version": "0.20.0",
"resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.20.0.tgz",
"integrity": "sha512-kQ7jYdlKS335mpGbMW5tEe3IrQFIok9r84EM3PXB8qBFJPSc6dpWfrtsC/y1pyrz82xfUIn5ZrnSHQQsd6jebQ==",
"cpu": [
"arm64"
],
@@ -162,9 +162,9 @@
}
},
"node_modules/@esbuild/freebsd-x64": {
"version": "0.19.11",
"resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.19.11.tgz",
"integrity": "sha512-JkUqn44AffGXitVI6/AbQdoYAq0TEullFdqcMY/PCUZ36xJ9ZJRtQabzMA+Vi7r78+25ZIBosLTOKnUXBSi1Kw==",
"version": "0.20.0",
"resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.20.0.tgz",
"integrity": "sha512-uG8B0WSepMRsBNVXAQcHf9+Ko/Tr+XqmK7Ptel9HVmnykupXdS4J7ovSQUIi0tQGIndhbqWLaIL/qO/cWhXKyQ==",
"cpu": [
"x64"
],
@@ -178,9 +178,9 @@
}
},
"node_modules/@esbuild/linux-arm": {
"version": "0.19.11",
"resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.19.11.tgz",
"integrity": "sha512-3CRkr9+vCV2XJbjwgzjPtO8T0SZUmRZla+UL1jw+XqHZPkPgZiyWvbDvl9rqAN8Zl7qJF0O/9ycMtjU67HN9/Q==",
"version": "0.20.0",
"resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.20.0.tgz",
"integrity": "sha512-2ezuhdiZw8vuHf1HKSf4TIk80naTbP9At7sOqZmdVwvvMyuoDiZB49YZKLsLOfKIr77+I40dWpHVeY5JHpIEIg==",
"cpu": [
"arm"
],
@@ -194,9 +194,9 @@
}
},
"node_modules/@esbuild/linux-arm64": {
"version": "0.19.11",
"resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.19.11.tgz",
"integrity": "sha512-LneLg3ypEeveBSMuoa0kwMpCGmpu8XQUh+mL8XXwoYZ6Be2qBnVtcDI5azSvh7vioMDhoJFZzp9GWp9IWpYoUg==",
"version": "0.20.0",
"resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.20.0.tgz",
"integrity": "sha512-uTtyYAP5veqi2z9b6Gr0NUoNv9F/rOzI8tOD5jKcCvRUn7T60Bb+42NDBCWNhMjkQzI0qqwXkQGo1SY41G52nw==",
"cpu": [
"arm64"
],
@@ -210,9 +210,9 @@
}
},
"node_modules/@esbuild/linux-ia32": {
"version": "0.19.11",
"resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.19.11.tgz",
"integrity": "sha512-caHy++CsD8Bgq2V5CodbJjFPEiDPq8JJmBdeyZ8GWVQMjRD0sU548nNdwPNvKjVpamYYVL40AORekgfIubwHoA==",
"version": "0.20.0",
"resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.20.0.tgz",
"integrity": "sha512-c88wwtfs8tTffPaoJ+SQn3y+lKtgTzyjkD8NgsyCtCmtoIC8RDL7PrJU05an/e9VuAke6eJqGkoMhJK1RY6z4w==",
"cpu": [
"ia32"
],
@@ -226,9 +226,9 @@
}
},
"node_modules/@esbuild/linux-loong64": {
"version": "0.19.11",
"resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.19.11.tgz",
"integrity": "sha512-ppZSSLVpPrwHccvC6nQVZaSHlFsvCQyjnvirnVjbKSHuE5N24Yl8F3UwYUUR1UEPaFObGD2tSvVKbvR+uT1Nrg==",
"version": "0.20.0",
"resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.20.0.tgz",
"integrity": "sha512-lR2rr/128/6svngnVta6JN4gxSXle/yZEZL3o4XZ6esOqhyR4wsKyfu6qXAL04S4S5CgGfG+GYZnjFd4YiG3Aw==",
"cpu": [
"loong64"
],
@@ -242,9 +242,9 @@
}
},
"node_modules/@esbuild/linux-mips64el": {
"version": "0.19.11",
"resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.19.11.tgz",
"integrity": "sha512-B5x9j0OgjG+v1dF2DkH34lr+7Gmv0kzX6/V0afF41FkPMMqaQ77pH7CrhWeR22aEeHKaeZVtZ6yFwlxOKPVFyg==",
"version": "0.20.0",
"resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.20.0.tgz",
"integrity": "sha512-9Sycc+1uUsDnJCelDf6ZNqgZQoK1mJvFtqf2MUz4ujTxGhvCWw+4chYfDLPepMEvVL9PDwn6HrXad5yOrNzIsQ==",
"cpu": [
"mips64el"
],
@@ -258,9 +258,9 @@
}
},
"node_modules/@esbuild/linux-ppc64": {
"version": "0.19.11",
"resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.19.11.tgz",
"integrity": "sha512-MHrZYLeCG8vXblMetWyttkdVRjQlQUb/oMgBNurVEnhj4YWOr4G5lmBfZjHYQHHN0g6yDmCAQRR8MUHldvvRDA==",
"version": "0.20.0",
"resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.20.0.tgz",
"integrity": "sha512-CoWSaaAXOZd+CjbUTdXIJE/t7Oz+4g90A3VBCHLbfuc5yUQU/nFDLOzQsN0cdxgXd97lYW/psIIBdjzQIwTBGw==",
"cpu": [
"ppc64"
],
@@ -274,9 +274,9 @@
}
},
"node_modules/@esbuild/linux-riscv64": {
"version": "0.19.11",
"resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.19.11.tgz",
"integrity": "sha512-f3DY++t94uVg141dozDu4CCUkYW+09rWtaWfnb3bqe4w5NqmZd6nPVBm+qbz7WaHZCoqXqHz5p6CM6qv3qnSSQ==",
"version": "0.20.0",
"resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.20.0.tgz",
"integrity": "sha512-mlb1hg/eYRJUpv8h/x+4ShgoNLL8wgZ64SUr26KwglTYnwAWjkhR2GpoKftDbPOCnodA9t4Y/b68H4J9XmmPzA==",
"cpu": [
"riscv64"
],
@@ -290,9 +290,9 @@
}
},
"node_modules/@esbuild/linux-s390x": {
"version": "0.19.11",
"resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.19.11.tgz",
"integrity": "sha512-A5xdUoyWJHMMlcSMcPGVLzYzpcY8QP1RtYzX5/bS4dvjBGVxdhuiYyFwp7z74ocV7WDc0n1harxmpq2ePOjI0Q==",
"version": "0.20.0",
"resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.20.0.tgz",
"integrity": "sha512-fgf9ubb53xSnOBqyvWEY6ukBNRl1mVX1srPNu06B6mNsNK20JfH6xV6jECzrQ69/VMiTLvHMicQR/PgTOgqJUQ==",
"cpu": [
"s390x"
],
@@ -306,9 +306,9 @@
}
},
"node_modules/@esbuild/linux-x64": {
"version": "0.19.11",
"resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.19.11.tgz",
"integrity": "sha512-grbyMlVCvJSfxFQUndw5mCtWs5LO1gUlwP4CDi4iJBbVpZcqLVT29FxgGuBJGSzyOxotFG4LoO5X+M1350zmPA==",
"version": "0.20.0",
"resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.20.0.tgz",
"integrity": "sha512-H9Eu6MGse++204XZcYsse1yFHmRXEWgadk2N58O/xd50P9EvFMLJTQLg+lB4E1cF2xhLZU5luSWtGTb0l9UeSg==",
"cpu": [
"x64"
],
@@ -322,9 +322,9 @@
}
},
"node_modules/@esbuild/netbsd-x64": {
"version": "0.19.11",
"resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.19.11.tgz",
"integrity": "sha512-13jvrQZJc3P230OhU8xgwUnDeuC/9egsjTkXN49b3GcS5BKvJqZn86aGM8W9pd14Kd+u7HuFBMVtrNGhh6fHEQ==",
"version": "0.20.0",
"resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.20.0.tgz",
"integrity": "sha512-lCT675rTN1v8Fo+RGrE5KjSnfY0x9Og4RN7t7lVrN3vMSjy34/+3na0q7RIfWDAj0e0rCh0OL+P88lu3Rt21MQ==",
"cpu": [
"x64"
],
@@ -338,9 +338,9 @@
}
},
"node_modules/@esbuild/openbsd-x64": {
"version": "0.19.11",
"resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.19.11.tgz",
"integrity": "sha512-ysyOGZuTp6SNKPE11INDUeFVVQFrhcNDVUgSQVDzqsqX38DjhPEPATpid04LCoUr2WXhQTEZ8ct/EgJCUDpyNw==",
"version": "0.20.0",
"resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.20.0.tgz",
"integrity": "sha512-HKoUGXz/TOVXKQ+67NhxyHv+aDSZf44QpWLa3I1lLvAwGq8x1k0T+e2HHSRvxWhfJrFxaaqre1+YyzQ99KixoA==",
"cpu": [
"x64"
],
@@ -354,9 +354,9 @@
}
},
"node_modules/@esbuild/sunos-x64": {
"version": "0.19.11",
"resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.19.11.tgz",
"integrity": "sha512-Hf+Sad9nVwvtxy4DXCZQqLpgmRTQqyFyhT3bZ4F2XlJCjxGmRFF0Shwn9rzhOYRB61w9VMXUkxlBy56dk9JJiQ==",
"version": "0.20.0",
"resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.20.0.tgz",
"integrity": "sha512-GDwAqgHQm1mVoPppGsoq4WJwT3vhnz/2N62CzhvApFD1eJyTroob30FPpOZabN+FgCjhG+AgcZyOPIkR8dfD7g==",
"cpu": [
"x64"
],
@@ -370,9 +370,9 @@
}
},
"node_modules/@esbuild/win32-arm64": {
"version": "0.19.11",
"resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.19.11.tgz",
"integrity": "sha512-0P58Sbi0LctOMOQbpEOvOL44Ne0sqbS0XWHMvvrg6NE5jQ1xguCSSw9jQeUk2lfrXYsKDdOe6K+oZiwKPilYPQ==",
"version": "0.20.0",
"resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.20.0.tgz",
"integrity": "sha512-0vYsP8aC4TvMlOQYozoksiaxjlvUcQrac+muDqj1Fxy6jh9l9CZJzj7zmh8JGfiV49cYLTorFLxg7593pGldwQ==",
"cpu": [
"arm64"
],
@@ -386,9 +386,9 @@
}
},
"node_modules/@esbuild/win32-ia32": {
"version": "0.19.11",
"resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.19.11.tgz",
"integrity": "sha512-6YOrWS+sDJDmshdBIQU+Uoyh7pQKrdykdefC1avn76ss5c+RN6gut3LZA4E2cH5xUEp5/cA0+YxRaVtRAb0xBg==",
"version": "0.20.0",
"resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.20.0.tgz",
"integrity": "sha512-p98u4rIgfh4gdpV00IqknBD5pC84LCub+4a3MO+zjqvU5MVXOc3hqR2UgT2jI2nh3h8s9EQxmOsVI3tyzv1iFg==",
"cpu": [
"ia32"
],
@@ -402,9 +402,9 @@
}
},
"node_modules/@esbuild/win32-x64": {
"version": "0.19.11",
"resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.19.11.tgz",
"integrity": "sha512-vfkhltrjCAb603XaFhqhAF4LGDi2M4OrCRrFusyQ+iTLQ/o60QQXxc9cZC/FFpihBI9N1Grn6SMKVJ4KP7Fuiw==",
"version": "0.20.0",
"resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.20.0.tgz",
"integrity": "sha512-NgJnesu1RtWihtTtXGFMU5YSE6JyyHPMxCwBZK7a6/8d31GuSo9l0Ss7w1Jw5QnKUawG6UEehs883kcXf5fYwg==",
"cpu": [
"x64"
],
@@ -421,7 +421,6 @@
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.0.0.tgz",
"integrity": "sha512-JUFJad5lv7jxj926GPgymrWQxxjPYuJNiNjNMzqT+HiuP6Vl3dk5xzG+8sTX96np0ZAluvaMzPsjhHZ5rNuNQQ==",
"dev": true,
"engines": {
"node": ">=14"
}
@@ -788,14 +787,15 @@
"integrity": "sha512-XISRgDJ2Tc5q4TRqvgJtzsRkFYNJzZrhTdtMoGVBttwzzQJkPnS3WWTFc7kuDRoPtPakl+T+OfdEUjYJj7Jbow=="
},
"node_modules/@vercel/nft": {
"version": "0.24.4",
"resolved": "https://registry.npmjs.org/@vercel/nft/-/nft-0.24.4.tgz",
"integrity": "sha512-KjYAZty7boH5fi5udp6p+lNu6nawgs++pHW+3koErMgbRkkHuToGX/FwjN5clV1FcaM3udfd4zW/sUapkMgpZw==",
"version": "0.26.2",
"resolved": "https://registry.npmjs.org/@vercel/nft/-/nft-0.26.2.tgz",
"integrity": "sha512-bxe2iShmKZi7476xYamyKvhhKwQ6JPEtQ2FSq1AjMUH2buMd8LQMkdoHinTqZYc+1sMTh3G0ARdjzNvV1FEisA==",
"dev": true,
"dependencies": {
"@mapbox/node-pre-gyp": "^1.0.5",
"@rollup/pluginutils": "^4.0.0",
"acorn": "^8.6.0",
"acorn-import-attributes": "^1.9.2",
"async-sema": "^3.1.1",
"bindings": "^1.4.0",
"estree-walker": "2.0.2",
@@ -830,10 +830,19 @@
"node": ">=0.4.0"
}
},
"node_modules/acorn-import-attributes": {
"version": "1.9.2",
"resolved": "https://registry.npmjs.org/acorn-import-attributes/-/acorn-import-attributes-1.9.2.tgz",
"integrity": "sha512-O+nfJwNolEA771IYJaiLWK1UAwjNsQmZbTRqqwBYxCgVQTmpFEMvBw6LOIQV0Me339L5UMVYFyRohGnGlQDdIQ==",
"dev": true,
"peerDependencies": {
"acorn": "^8"
}
},
"node_modules/acorn-walk": {
"version": "8.3.1",
"resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.1.tgz",
"integrity": "sha512-TgUZgYvqZprrl7YldZNoa9OciCAyZR+Ejm9eXzKCmjsF5IKp/wgQ7Z/ZpjpGTIUPwrHQIcYeI8qDh4PsEwxMbw==",
"version": "8.3.2",
"resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.2.tgz",
"integrity": "sha512-cjkyv4OtNCIeqhHrfS81QWXoCBPExR/J62oyEqepVw8WaQeSqpW2uhuLPh1m9eWhDuOo/jUXVTlifvesOWp/4A==",
"dev": true,
"engines": {
"node": ">=0.4.0"
@@ -940,14 +949,14 @@
"dev": true
},
"node_modules/ava": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/ava/-/ava-6.0.1.tgz",
"integrity": "sha512-9zR0wOwlcJdOWwHOKnpi0GrPRLTlxDFapGalP4rGD0oQRKxDVoucBBWvxVQ/2cPv10Hx1PkDXLJH5iUzhPn0/g==",
"version": "6.1.1",
"resolved": "https://registry.npmjs.org/ava/-/ava-6.1.1.tgz",
"integrity": "sha512-A+DG0Ag0e5zvt262Ze0pG5QH7EBmhn+DB9uK7WkUtJVAtGjZFeKTpUOKx339DMGn53+FB24pCJC5klX2WU4VOw==",
"dev": true,
"dependencies": {
"@vercel/nft": "^0.24.4",
"acorn": "^8.11.2",
"acorn-walk": "^8.3.0",
"@vercel/nft": "^0.26.2",
"acorn": "^8.11.3",
"acorn-walk": "^8.3.2",
"ansi-styles": "^6.2.1",
"arrgv": "^1.0.2",
"arrify": "^3.0.0",
@@ -973,11 +982,11 @@
"matcher": "^5.0.0",
"memoize": "^10.0.0",
"ms": "^2.1.3",
"p-map": "^6.0.0",
"p-map": "^7.0.1",
"package-config": "^5.0.0",
"picomatch": "^3.0.1",
"plur": "^5.1.0",
"pretty-ms": "^8.0.0",
"pretty-ms": "^9.0.0",
"resolve-cwd": "^3.0.0",
"stack-utils": "^2.0.6",
"strip-ansi": "^7.1.0",
@@ -1070,19 +1079,18 @@
}
},
"node_modules/c8": {
"version": "8.0.1",
"resolved": "https://registry.npmjs.org/c8/-/c8-8.0.1.tgz",
"integrity": "sha512-EINpopxZNH1mETuI0DzRA4MZpAUH+IFiRhnmFD3vFr3vdrgxqi3VfE3KL0AIL+zDq8rC9bZqwM/VDmmoe04y7w==",
"version": "9.1.0",
"resolved": "https://registry.npmjs.org/c8/-/c8-9.1.0.tgz",
"integrity": "sha512-mBWcT5iqNir1zIkzSPyI3NCR9EZCVI3WUD+AVO17MVWTSFNyUueXE82qTeampNtTr+ilN/5Ua3j24LgbCKjDVg==",
"dev": true,
"dependencies": {
"@bcoe/v8-coverage": "^0.2.3",
"@istanbuljs/schema": "^0.1.3",
"find-up": "^5.0.0",
"foreground-child": "^2.0.0",
"foreground-child": "^3.1.1",
"istanbul-lib-coverage": "^3.2.0",
"istanbul-lib-report": "^3.0.1",
"istanbul-reports": "^3.1.6",
"rimraf": "^3.0.2",
"test-exclude": "^6.0.0",
"v8-to-istanbul": "^9.0.0",
"yargs": "^17.7.2",
@@ -1092,7 +1100,7 @@
"c8": "bin/c8.js"
},
"engines": {
"node": ">=12"
"node": ">=14.14.0"
}
},
"node_modules/c8/node_modules/find-up": {
@@ -1569,9 +1577,9 @@
}
},
"node_modules/dotenv": {
"version": "16.3.1",
"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.3.1.tgz",
"integrity": "sha512-IPzF4w4/Rd94bA9imS68tZBaYyBWSCE47V1RGuMrB94iyTOIEwRmVL2x/4An+6mETpLrKJ5hQkB8W4kFAadeIQ==",
"version": "16.4.1",
"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.1.tgz",
"integrity": "sha512-CjA3y+Dr3FyFDOAMnxZEGtnW9KBR2M0JvvUtXNW+dYJL5ROWxP9DUHCwgFqpMk0OXCc0ljhaNTr2w/kutYIcHQ==",
"dev": true,
"engines": {
"node": ">=12"
@@ -1607,9 +1615,9 @@
"dev": true
},
"node_modules/esbuild": {
"version": "0.19.11",
"resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.19.11.tgz",
"integrity": "sha512-HJ96Hev2hX/6i5cDVwcqiJBBtuo9+FeIJOtZ9W1kA5M6AMJRHUZlpYZ1/SbEwtO0ioNAW8rUooVpC/WehY2SfA==",
"version": "0.20.0",
"resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.20.0.tgz",
"integrity": "sha512-6iwE3Y2RVYCME1jLpBqq7LQWK3MW6vjV2bZy6gt/WrqkY+WE74Spyc0ThAOYpMtITvnjX09CrC6ym7A/m9mebA==",
"dev": true,
"hasInstallScript": true,
"bin": {
@@ -1619,29 +1627,29 @@
"node": ">=12"
},
"optionalDependencies": {
"@esbuild/aix-ppc64": "0.19.11",
"@esbuild/android-arm": "0.19.11",
"@esbuild/android-arm64": "0.19.11",
"@esbuild/android-x64": "0.19.11",
"@esbuild/darwin-arm64": "0.19.11",
"@esbuild/darwin-x64": "0.19.11",
"@esbuild/freebsd-arm64": "0.19.11",
"@esbuild/freebsd-x64": "0.19.11",
"@esbuild/linux-arm": "0.19.11",
"@esbuild/linux-arm64": "0.19.11",
"@esbuild/linux-ia32": "0.19.11",
"@esbuild/linux-loong64": "0.19.11",
"@esbuild/linux-mips64el": "0.19.11",
"@esbuild/linux-ppc64": "0.19.11",
"@esbuild/linux-riscv64": "0.19.11",
"@esbuild/linux-s390x": "0.19.11",
"@esbuild/linux-x64": "0.19.11",
"@esbuild/netbsd-x64": "0.19.11",
"@esbuild/openbsd-x64": "0.19.11",
"@esbuild/sunos-x64": "0.19.11",
"@esbuild/win32-arm64": "0.19.11",
"@esbuild/win32-ia32": "0.19.11",
"@esbuild/win32-x64": "0.19.11"
"@esbuild/aix-ppc64": "0.20.0",
"@esbuild/android-arm": "0.20.0",
"@esbuild/android-arm64": "0.20.0",
"@esbuild/android-x64": "0.20.0",
"@esbuild/darwin-arm64": "0.20.0",
"@esbuild/darwin-x64": "0.20.0",
"@esbuild/freebsd-arm64": "0.20.0",
"@esbuild/freebsd-x64": "0.20.0",
"@esbuild/linux-arm": "0.20.0",
"@esbuild/linux-arm64": "0.20.0",
"@esbuild/linux-ia32": "0.20.0",
"@esbuild/linux-loong64": "0.20.0",
"@esbuild/linux-mips64el": "0.20.0",
"@esbuild/linux-ppc64": "0.20.0",
"@esbuild/linux-riscv64": "0.20.0",
"@esbuild/linux-s390x": "0.20.0",
"@esbuild/linux-x64": "0.20.0",
"@esbuild/netbsd-x64": "0.20.0",
"@esbuild/openbsd-x64": "0.20.0",
"@esbuild/sunos-x64": "0.20.0",
"@esbuild/win32-arm64": "0.20.0",
"@esbuild/win32-ia32": "0.20.0",
"@esbuild/win32-x64": "0.20.0"
}
},
"node_modules/escalade": {
@@ -1810,24 +1818,21 @@
}
},
"node_modules/foreground-child": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-2.0.0.tgz",
"integrity": "sha512-dCIq9FpEcyQyXKCkyzmlPTFNgrCzPudOe+mhvJU5zAtlBnGVy2yKxtfsxK2tQBThwq225jcvBjpw1Gr40uzZCA==",
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.1.1.tgz",
"integrity": "sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==",
"dev": true,
"dependencies": {
"cross-spawn": "^7.0.0",
"signal-exit": "^3.0.2"
"signal-exit": "^4.0.1"
},
"engines": {
"node": ">=8.0.0"
"node": ">=14"
},
"funding": {
"url": "https://github.com/sponsors/isaacs"
}
},
"node_modules/foreground-child/node_modules/signal-exit": {
"version": "3.0.7",
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz",
"integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==",
"dev": true
},
"node_modules/fs-minipass": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz",
@@ -2685,9 +2690,9 @@
}
},
"node_modules/node-gyp-build": {
"version": "4.7.1",
"resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.7.1.tgz",
"integrity": "sha512-wTSrZ+8lsRRa3I3H8Xr65dLWSgCvY2l4AOnaeKdPA9TB/WYMPaTcrzf3rXvFoVvjKNVnu0CcWSx54qq9GKRUYg==",
"version": "4.8.0",
"resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.8.0.tgz",
"integrity": "sha512-u6fs2AEUljNho3EYTJNBfImO5QTo/J/1Etd+NVdCj7qWKUSN/bSLkZwhDv7I+w/MSC6qJ4cknepkAYykDdK8og==",
"dev": true,
"bin": {
"node-gyp-build": "bin.js",
@@ -2831,12 +2836,12 @@
}
},
"node_modules/p-map": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/p-map/-/p-map-6.0.0.tgz",
"integrity": "sha512-T8BatKGY+k5rU+Q/GTYgrEf2r4xRMevAN5mtXc2aPc4rS1j3s+vWTaO2Wag94neXuCAUAs8cxBL9EeB5EA6diw==",
"version": "7.0.1",
"resolved": "https://registry.npmjs.org/p-map/-/p-map-7.0.1.tgz",
"integrity": "sha512-2wnaR0XL/FDOj+TgpDuRb2KTjLnu3Fma6b1ZUwGY7LcqenMcvP/YFpjpbPKY6WVGsbuJZRuoUz8iPrt8ORnAFw==",
"dev": true,
"engines": {
"node": ">=16"
"node": ">=18"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
@@ -2875,12 +2880,12 @@
}
},
"node_modules/parse-ms": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/parse-ms/-/parse-ms-3.0.0.tgz",
"integrity": "sha512-Tpb8Z7r7XbbtBTrM9UhpkzzaMrqA2VXMT3YChzYltwV3P3pM6t8wl7TvpMnSTosz1aQAdVib7kdoys7vYOPerw==",
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/parse-ms/-/parse-ms-4.0.0.tgz",
"integrity": "sha512-TXfryirbmq34y8QBwgqCVLi+8oA3oWx2eAnSn62ITyEhEYaWRlVZ2DvMM9eZbMs/RfxPu/PK/aBLyGj4IrqMHw==",
"dev": true,
"engines": {
"node": ">=12"
"node": ">=18"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
@@ -2957,15 +2962,15 @@
}
},
"node_modules/pretty-ms": {
"version": "8.0.0",
"resolved": "https://registry.npmjs.org/pretty-ms/-/pretty-ms-8.0.0.tgz",
"integrity": "sha512-ASJqOugUF1bbzI35STMBUpZqdfYKlJugy6JBziGi2EE+AL5JPJGSzvpeVXojxrr0ViUYoToUjb5kjSEGf7Y83Q==",
"version": "9.0.0",
"resolved": "https://registry.npmjs.org/pretty-ms/-/pretty-ms-9.0.0.tgz",
"integrity": "sha512-E9e9HJ9R9NasGOgPaPE8VMeiPKAyWR5jcFpNnwIejslIhWqdqOrb2wShBsncMPUb+BcCd2OPYfh7p2W6oemTng==",
"dev": true,
"dependencies": {
"parse-ms": "^3.0.0"
"parse-ms": "^4.0.0"
},
"engines": {
"node": ">=14.16"
"node": ">=18"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
@@ -3513,10 +3518,9 @@
}
},
"node_modules/undici": {
"version": "6.2.1",
"resolved": "https://registry.npmjs.org/undici/-/undici-6.2.1.tgz",
"integrity": "sha512-7Wa9thEM6/LMnnKtxJHlc8SrTlDmxqJecgz1iy8KlsN0/iskQXOQCuPkrZLXbElPaSw5slFFyKIKXyJ3UtbApw==",
"dev": true,
"version": "6.6.1",
"resolved": "https://registry.npmjs.org/undici/-/undici-6.6.1.tgz",
"integrity": "sha512-J0GaEp0ztu/grIE2Uq57AbK6TRb+bWbOlxu0POCzhFKA6LKbwSAev+hDQaQcgUUA9CPs8Ky+cauzTHnQrtAQEA==",
"dependencies": {
"@fastify/busboy": "^2.0.0"
},
+7 -7
View File
@@ -2,7 +2,7 @@
"name": "create-github-app-token",
"private": true,
"type": "module",
"version": "1.6.4",
"version": "1.8.1",
"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",
@@ -15,17 +15,17 @@
"@actions/core": "^1.10.1",
"@octokit/auth-app": "^6.0.3",
"@octokit/request": "^8.1.6",
"p-retry": "^6.2.0"
"p-retry": "^6.2.0",
"undici": "^6.6.1"
},
"devDependencies": {
"@sinonjs/fake-timers": "^11.2.2",
"ava": "^6.0.1",
"c8": "^8.0.1",
"dotenv": "^16.3.1",
"esbuild": "^0.19.11",
"ava": "^6.1.1",
"c8": "^9.1.0",
"dotenv": "^16.4.1",
"esbuild": "^0.20.0",
"execa": "^8.0.1",
"open-cli": "^8.0.0",
"undici": "^6.2.1",
"yaml": "^2.3.4"
},
"release": {
+1 -6
View File
@@ -5,12 +5,7 @@ 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) => {
post(core, request).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",
}
);
@@ -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",
+22 -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-----
// https://docs.github.com/actions/creating-actions/metadata-syntax-for-github-actions#example-specifying-inputs
"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",
@@ -75,7 +82,7 @@ x3WQZRiXlWejSMUAHuMwXrhGlltF3lw83+xAjnqsVp75kGS6OH61
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",
@@ -4,8 +4,14 @@ 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();
process.env.STATE_expiresAt = new Date(
Date.now() + 1000 * 60 * 60
).toISOString();
const mockAgent = new MockAgent();
+4
View File
@@ -4,6 +4,10 @@ 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();
+16
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
Binary file not shown.