Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Gert Hengeveld <info@ghengeveld.nl>
  • Loading branch information
tmeasday and ghengeveld committed Aug 14, 2023
1 parent f4c34ce commit a49d334
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion node-src/lib/emailHash.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// This is duplicated from https://github.com/chromaui/chromatic/blob/1ceabdd81936b883a2a9ddc804ed13bfa0919c47/services/index/model/lib/emailHash.ts#L1-L7
import { createHash } from 'crypto';

// Inspired by https://en.gravatar.com/site/implement/hash
Expand Down
2 changes: 1 addition & 1 deletion node-src/lib/localBuildsSpecifier.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { emailHash } from './emailHash';
export function localBuildsSpecifier(ctx: Pick<Context, 'options' | 'git'>) {
if (ctx.options.isLocalBuild) return { localBuildEmailHash: emailHash(ctx.git.gitUserEmail) };

// For non local builds, if we have a committer hash, we want only local builds from that person
// For global builds, we only want local builds from the committer (besides global builds)
if (ctx.git.committerEmail) return { localBuildEmailHash: emailHash(ctx.git.committerEmail) };

// If we don't know, we fall back to *no local builds at all*
Expand Down
2 changes: 1 addition & 1 deletion node-src/tasks/initialize.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export const announceBuild = async (ctx: Context) => {
patchBaseRef,
patchHeadRef,
preserveMissingSpecs,
gitUserEmailHash: emailHash(gitUserEmail),
...(gitUserEmail && { gitUserEmailHash: emailHash(gitUserEmail) }),
...commitInfo,
committedAt: new Date(committedAt),
ciVariables: ctx.environment,
Expand Down

0 comments on commit a49d334

Please sign in to comment.