build: add support for fetching github token from sudowoodo (#43886)
* build: add support for fetching github token from sudowoodo Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com> * chore: update release notes cache for tests Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com> * build: support nightlies repo correctly Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com> * build: post token Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com> --------- Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com>
This commit is contained in:
parent
dddcc09185
commit
ff65b58e2c
27 changed files with 123 additions and 35 deletions
|
@ -1,9 +1,7 @@
|
|||
if (!process.env.CI) require('dotenv-safe').load();
|
||||
|
||||
const { Octokit } = require('@octokit/rest');
|
||||
const octokit = new Octokit({
|
||||
auth: process.env.ELECTRON_GITHUB_TOKEN
|
||||
});
|
||||
const { createGitHubTokenStrategy } = require('./github-token');
|
||||
|
||||
if (process.argv.length < 3) {
|
||||
console.log('Usage: find-release version');
|
||||
|
@ -13,6 +11,10 @@ if (process.argv.length < 3) {
|
|||
const version = process.argv[2];
|
||||
const targetRepo = findRepo();
|
||||
|
||||
const octokit = new Octokit({
|
||||
authStrategy: createGitHubTokenStrategy(targetRepo)
|
||||
});
|
||||
|
||||
function findRepo () {
|
||||
return version.indexOf('nightly') > 0 ? 'nightlies' : 'electron';
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue