mirror of
https://code.forgejo.org/actions/setup-node
synced 2025-06-17 01:04:10 +02:00
Add auth support (#21)
* Updates * Update * Update * Update * Update * Yarn sometimes prefers npmrc, so use same token * Description * Update readme * Feedback * Add type * new toolkit and scoped registries * npmrc in RUNNER_TEMP * Dont always auth * Try exporting blank token * Get auth working for now pending runner changes * Fix string interpolation for auth token. * Don't export both userconfigs * Update authutil.js * Add single quotes for authString * Fix the registry string. * Use userconfig and append trailing slash * Keep in root of repo * Try just adding auth token * Remove auth token * Try changes again * Add tests * Npm and GPR samples * Add types
This commit is contained in:
parent
0675b87d74
commit
78148dae50
391 changed files with 79848 additions and 43 deletions
42
node_modules/octokit-pagination-methods/README.md
generated
vendored
Normal file
42
node_modules/octokit-pagination-methods/README.md
generated
vendored
Normal file
|
@ -0,0 +1,42 @@
|
|||
# octokit-pagination-methods
|
||||
|
||||
> Legacy Octokit pagination methods from v15
|
||||
|
||||
[](https://travis-ci.com/gr2m/octokit-pagination-methods)
|
||||
[](https://coveralls.io/github/gr2m/octokit-pagination-methods?branch=master)
|
||||
[](https://greenkeeper.io/)
|
||||
|
||||
Several pagination methods such as `octokit.hasNextPage()` and `octokit.getNextPage()` have been removed from `@octokit/request` in v16.0.0 in favor of `octokit.paginate()`. This plugin brings back the methods to ease the upgrade to v16.
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
const Octokit = require('@octokit/rest')
|
||||
.plugin('octokit-pagination-methods')
|
||||
const octokit = new Octokit()
|
||||
|
||||
octokit.issues.getForRepo()
|
||||
|
||||
.then(async response => {
|
||||
// returns true/false
|
||||
octokit.hasNextPage(response)
|
||||
octokit.hasPreviousPage(response)
|
||||
octokit.hasFirstPage(response)
|
||||
octokit.hasLastPage(response)
|
||||
|
||||
// fetch other pages
|
||||
const nextPage = await octokit.getNextPage(response)
|
||||
const previousPage = await octokit.getPreviousPage(response)
|
||||
const firstPage = await octokit.getFirstPage(response)
|
||||
const lastPage = await octokit.getLastPage(response)
|
||||
})
|
||||
```
|
||||
|
||||
## Credit
|
||||
|
||||
These methods have originally been created for `node-github` by [@mikedeboer](https://github.com/mikedeboer)
|
||||
while working at Cloud9 IDE, Inc. It was adopted and renamed by GitHub in 2017.
|
||||
|
||||
## LICENSE
|
||||
|
||||
[MIT](LICENSE)
|
Loading…
Add table
Add a link
Reference in a new issue