From f6e0eed305290384673c8987fc54f44c7f33411d Mon Sep 17 00:00:00 2001 From: Kipras Melnikovas Date: Wed, 22 Dec 2021 01:11:38 +0200 Subject: [PATCH] chore: rename `userAllowedToApply` to `userAllowedToApplyAndWeApplied` for clarity Signed-off-by: Kipras Melnikovas --- apply.ts | 10 +++++----- git-stacked-rebase.ts | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/apply.ts b/apply.ts index 3672209c..344adc28 100644 --- a/apply.ts +++ b/apply.ts @@ -84,18 +84,18 @@ noop(defaultApplyCallback__disabled); export type ReturnOfApplyIfNeedsToApply = | { neededToApply: false; - userAllowedToApply?: never; + userAllowedToApplyAndWeApplied?: never; markThatNeedsToApply: () => void; } | { neededToApply: true; - userAllowedToApply: false; + userAllowedToApplyAndWeApplied: false; // markThatNeedsToApply?: never; // TODO TS infer auto - force code owner to exit markThatNeedsToApply: () => void; } | { neededToApply: true; - userAllowedToApply: true; + userAllowedToApplyAndWeApplied: true; markThatNeedsToApply: () => void; }; @@ -159,7 +159,7 @@ export async function applyIfNeedsToApply({ if (!userAllowedToApply && !userAllowedToApplyAlways) { return { neededToApply: true, - userAllowedToApply: false, + userAllowedToApplyAndWeApplied: false, markThatNeedsToApply, }; } @@ -181,7 +181,7 @@ export async function applyIfNeedsToApply({ return { neededToApply: true, - userAllowedToApply: true, // + userAllowedToApplyAndWeApplied: true, // markThatNeedsToApply, }; } diff --git a/git-stacked-rebase.ts b/git-stacked-rebase.ts index 354bc3ef..3bcf2d6f 100755 --- a/git-stacked-rebase.ts +++ b/git-stacked-rebase.ts @@ -174,7 +174,7 @@ export const gitStackedRebase = async ( }); } - const { neededToApply, userAllowedToApply, markThatNeedsToApply } = await applyIfNeedsToApply({ + const { neededToApply, userAllowedToApplyAndWeApplied, markThatNeedsToApply } = await applyIfNeedsToApply({ repo, pathToStackedRebaseTodoFile, pathToStackedRebaseDirInsideDotGit, // @@ -184,7 +184,7 @@ export const gitStackedRebase = async ( config, }); - if (neededToApply && !userAllowedToApply) { + if (neededToApply && !userAllowedToApplyAndWeApplied) { return; }