Skip to content

Commit

Permalink
chore: rename userAllowedToApply to `userAllowedToApplyAndWeApplied…
Browse files Browse the repository at this point in the history
…` for clarity

Signed-off-by: Kipras Melnikovas <[email protected]>
  • Loading branch information
kiprasmel committed Dec 22, 2021
1 parent 4645584 commit f6e0eed
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions apply.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};

Expand Down Expand Up @@ -159,7 +159,7 @@ export async function applyIfNeedsToApply({
if (!userAllowedToApply && !userAllowedToApplyAlways) {
return {
neededToApply: true,
userAllowedToApply: false,
userAllowedToApplyAndWeApplied: false,
markThatNeedsToApply,
};
}
Expand All @@ -181,7 +181,7 @@ export async function applyIfNeedsToApply({

return {
neededToApply: true,
userAllowedToApply: true, //
userAllowedToApplyAndWeApplied: true, //
markThatNeedsToApply,
};
}
4 changes: 2 additions & 2 deletions git-stacked-rebase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ export const gitStackedRebase = async (
});
}

const { neededToApply, userAllowedToApply, markThatNeedsToApply } = await applyIfNeedsToApply({
const { neededToApply, userAllowedToApplyAndWeApplied, markThatNeedsToApply } = await applyIfNeedsToApply({
repo,
pathToStackedRebaseTodoFile,
pathToStackedRebaseDirInsideDotGit, //
Expand All @@ -184,7 +184,7 @@ export const gitStackedRebase = async (
config,
});

if (neededToApply && !userAllowedToApply) {
if (neededToApply && !userAllowedToApplyAndWeApplied) {
return;
}

Expand Down

0 comments on commit f6e0eed

Please sign in to comment.