Only attempt to upload on dotcom
This commit is contained in:
parent
366b68eda0
commit
b985a67b97
3 changed files with 12 additions and 1 deletions
5
lib/analyze-action.js
generated
5
lib/analyze-action.js
generated
|
|
@ -34,6 +34,11 @@ async function sendStatusReport(startedAt, stats, error) {
|
||||||
await actionsUtil.sendStatusReport(statusReport);
|
await actionsUtil.sendStatusReport(statusReport);
|
||||||
}
|
}
|
||||||
async function uploadDatabases(repositoryNwo, config, apiDetails, logger) {
|
async function uploadDatabases(repositoryNwo, config, apiDetails, logger) {
|
||||||
|
// Do nothing when not running against github.com
|
||||||
|
if (config.gitHubVersion.type !== util.GitHubVariant.DOTCOM) {
|
||||||
|
logger.debug("Not running against github.com. Skipping upload.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (!(await actionsUtil.isAnalyzingDefaultBranch())) {
|
if (!(await actionsUtil.isAnalyzingDefaultBranch())) {
|
||||||
// We only want to upload a database if we are analyzing the default branch.
|
// We only want to upload a database if we are analyzing the default branch.
|
||||||
logger.debug("Not analyzing default branch. Skipping upload.");
|
logger.debug("Not analyzing default branch. Skipping upload.");
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -58,6 +58,12 @@ async function uploadDatabases(
|
||||||
apiDetails: GitHubApiDetails,
|
apiDetails: GitHubApiDetails,
|
||||||
logger: Logger
|
logger: Logger
|
||||||
): Promise<void> {
|
): Promise<void> {
|
||||||
|
// Do nothing when not running against github.com
|
||||||
|
if (config.gitHubVersion.type !== util.GitHubVariant.DOTCOM) {
|
||||||
|
logger.debug("Not running against github.com. Skipping upload.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (!(await actionsUtil.isAnalyzingDefaultBranch())) {
|
if (!(await actionsUtil.isAnalyzingDefaultBranch())) {
|
||||||
// We only want to upload a database if we are analyzing the default branch.
|
// We only want to upload a database if we are analyzing the default branch.
|
||||||
logger.debug("Not analyzing default branch. Skipping upload.");
|
logger.debug("Not analyzing default branch. Skipping upload.");
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue