import { PrLifecycleGuardConfig } from '@webpieces/rules-config'; import type { BashContext, Violation } from '../types'; import { BashRuleBase } from '../rule-base'; import { FixHint } from '../fix-hint'; export declare class PrCreationOrPushGuardRule extends BashRuleBase { /** * The gated command this guard names, handed in by the LOADER from `commands.guardHints * .prCreationOrPush` (already defaulted there). It is a constructor parameter, not a config field: * the field `pr-creation-or-push-guard.upsertPrCommand` was a SECOND SPELLING that beat the * commands section at the point of use, and the loader's name-keyed injection that fed it could * miss a rename without failing the build. One spelling, wired at compile time. */ private readonly upsertPrCommand; constructor(config: PrLifecycleGuardConfig, upsertPrCommand: string); readonly description = "Block manual `git push` and direct PR creation/edit (gh pr / gh api / curl) so pushes and PRs go only through the gated upsert-pr command."; get fixHint(): FixHint; check(ctx: BashContext): readonly Violation[]; /** * Read the configured dev refs, falling back to the defaults when this repo has no `pr-gate` section * at all (a consumer that has not adopted the gate still gets a correct hint for the default names). * * Calling the loader here is safe by construction: an INVALID config blocks every Bash call long * before a rule runs, so reaching this line already means the config loaded. */ private aimedAtDevEnvironment; }