Skip to content
Snippets Groups Projects
Select Git revision
  • e27fe66980c5aa4b54ad2a4d30e425df3d318ada
  • main default protected
  • next
  • chore/update-static-data
  • renovate/main-redis-5.x
  • feat/gnupg
  • fix/36615b-branch-reuse-no-cache
  • chore/punycode
  • refactor/pin-new-value
  • feat/36219--git-x509-signing
  • feat/structured-logger
  • hotfix/39.264.1
  • feat/skip-dangling
  • gh-readonly-queue/next/pr-36034-7a061c4ca1024a19e2c295d773d9642625d1c2be
  • hotfix/39.238.3
  • refactor/gitlab-auto-approve
  • feat/template-strings
  • gh-readonly-queue/next/pr-35654-137d934242c784e0c45d4b957362214f0eade1d7
  • fix/32307-global-extends-merging
  • fix/32307-global-extends-repositories
  • gh-readonly-queue/next/pr-35009-046ebf7cb84ab859f7fefceb5fa53a54ce9736f8
  • 41.52.2
  • 41.52.1
  • 41.52.0
  • 41.51.2
  • 41.51.1
  • 41.51.0
  • 41.50.0
  • 41.49.1
  • 41.49.0
  • 41.48.1
  • 41.48.0
  • 41.47.1
  • 41.47.0
  • 41.46.8
  • 41.46.7
  • 41.46.6
  • 41.46.5
  • 41.46.4
  • 41.46.3
  • 41.46.2
41 results

semantic.ts

Blame
  • conflicts-cache.ts 935 B
    import { logger } from '../../logger';
    import { getCache } from '../cache/repository';
    
    export function getCachedConflictResult(
      branchName: string,
      branchSha: string,
      baseBranch: string,
      baseBranchSha: string,
    ): boolean | null {
      const cache = getCache();
      const branch = cache?.branches?.find((br) => br.branchName === branchName);
      if (
        branch &&
        branch.baseBranch === baseBranch &&
        branch.baseBranchSha === baseBranchSha &&
        branch.sha === branchSha &&
        branch.isConflicted !== undefined
      ) {
        return branch.isConflicted;
      }
    
      return null;
    }
    
    export function setCachedConflictResult(
      branchName: string,
      isConflicted: boolean,
    ): void {
      const cache = getCache();
      const branch = cache?.branches?.find((br) => br.branchName === branchName);
    
      if (!branch) {
        logger.debug(`setCachedConflictResult(): Branch cache not present`);
        return;
      }
    
      branch.isConflicted = isConflicted;
    }