Unverified Commit d56d5e68 authored by JJ Kasper's avatar JJ Kasper Committed by GitHub

Update PR stats action branch check (#13394)

parent cefbcadf
......@@ -39,7 +39,7 @@ if (!allowedActions.has(actionInfo.actionName) && !actionInfo.isRelease) {
// load stats config from allowed locations
const { statsConfig, relativeStatsAppDir } = loadStatsConfig()
if (actionInfo.prRef === statsConfig.mainBranch) {
if (actionInfo.isLocal && actionInfo.prRef === statsConfig.mainBranch) {
throw new Error(
`'GITHUB_REF' can not be the same as mainBranch in 'stats-config.js'.\n` +
`This will result in comparing against the same branch`
......
......@@ -53,6 +53,7 @@ module.exports = function actionInfo() {
gitRoot: GIT_ROOT_DIR || 'https://github.com/',
prRepo: GITHUB_REPOSITORY,
prRef: GITHUB_REF,
isLocal: LOCAL_STATS,
commitId: null,
issueId: ISSUE_ID,
isRelease: releaseTypes.has(GITHUB_ACTION),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment