Skip to content

Commit

Permalink
fix: add github PAT ENV for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
truemiller committed Sep 26, 2024
1 parent f8627d6 commit ec7b16f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions electron/constants/config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
const { isDev } = require('./');

require('dotenv').config();

/**
Expand All @@ -20,7 +22,7 @@ require('dotenv').config();
/**
* GitHub update options
* @see https://www.electron.build/auto-update#githuboptions
* @type {Omit<PearlGithubUpdateOptions, 'token'> & {token: null}}
* @type {PearlGithubUpdateOptions}
* @warning `token` is leaked in app-update.yml if defined here,
* use {githubPublishOptions} instead if you're looking to release the app to GitHub
*/
Expand All @@ -33,7 +35,7 @@ const githubUpdateOptions = {
channel: 'latest', // The release channel to check for updates, e.g. 'latest', 'beta', 'alpha'
vPrefixedTagName: true,
protocol: 'https',
token: null,
token: isDev ? process.env.GH_TEST_PAT ?? null : null, // Personal Access Token (PAT) for GitHub when testing
};

/**
Expand Down

0 comments on commit ec7b16f

Please sign in to comment.