export function getInputs()

in gitlab/src/utils.ts [32:66]


export function getInputs(): Inputs {
  const rawArgs = getQodanaStringArg('ARGS', '')
  const argList = parseRawArguments(rawArgs)

  let pushFixes = getQodanaStringArg('PUSH_FIXES', 'none')
  if (pushFixes === 'merge-request') {
    pushFixes = 'pull-request'
  }

  return {
    args: argList,
    // user given results and cache dirs are used in uploadCache, prepareCaches and uploadArtifacts
    resultsDir: `${baseDir()}/results`,
    cacheDir: `${baseDir()}/cache`,
    uploadResult: getQodanaBooleanArg('UPLOAD_RESULT', false),
    prMode: getQodanaBooleanArg('MR_MODE', true),
    pushFixes: pushFixes,
    commitMessage: getQodanaStringArg(
      'COMMIT_MESSAGE',
      '🤖 Apply quick-fixes by Qodana'
    ),
    useNightly: getQodanaBooleanArg('USE_NIGHTLY', false),
    postComment: getQodanaBooleanArg('PUBLISH_COMMENT', true),
    useCaches: getQodanaBooleanArg('USE_CACHES', true),
    // not used by GitLab
    uploadSarif: false,
    useAnnotations: false,
    additionalCacheKey: '',
    primaryCacheKey: '',
    cacheDefaultBranchOnly: false,
    githubToken: '',
    artifactName: '',
    workingDirectory: ''
  }
}