Skip to content

Commit

Permalink
fix: naming
Browse files Browse the repository at this point in the history
  • Loading branch information
jpb06 committed Nov 9, 2024
1 parent 49b3b2a commit a54c888
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion dist/index.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/github/event/get-github-event-data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Effect, pipe } from 'effect';

import { extractCommitsMessages } from '../extract-commits-messages.js';
import { failIfNoDefaultBranch } from '../fail-if-no-default-branch.js';
import { failIfNotRunningOnCurrentBranch } from '../fail-if-not-current-branch.js';
import { failIfNotRunningOnDefaultBranch } from '../fail-if-not-running-on-default-branch.js';

import { maybeDebugEvent } from './maybe-debug-event.js';
import { readGithubEvent } from './read-github-event.js';
Expand All @@ -13,7 +13,7 @@ export const getGithubEventData = pipe(
Effect.all([
maybeDebugEvent(event),
failIfNoDefaultBranch(event),
failIfNotRunningOnCurrentBranch(event),
failIfNotRunningOnDefaultBranch(event),
extractCommitsMessages(event),
]),
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import type { GithubEvent } from '../types/github.types.js';

import { getCurrentBranch } from './get-current-branch.js';

export const failIfNotRunningOnCurrentBranch = (event: GithubEvent) =>
export const failIfNotRunningOnDefaultBranch = (event: GithubEvent) =>
pipe(
Effect.gen(function* () {
const currentBranch = yield* getCurrentBranch(event);
Expand All @@ -15,7 +15,7 @@ export const failIfNotRunningOnCurrentBranch = (event: GithubEvent) =>
if (!isDefaultBranch) {
yield* Effect.fail(
new NotRunningOnDefaultBranchError({
cause: 'Not running on current branch',
cause: 'Not running on default branch',
}),
);
}
Expand Down

0 comments on commit a54c888

Please sign in to comment.