Skip to content

Commit

Permalink
web,graphql: Prettier, correct commits
Browse files Browse the repository at this point in the history
  • Loading branch information
tbantle22 committed Nov 8, 2023
1 parent fc1fc07 commit aba6a2e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 12 deletions.
10 changes: 5 additions & 5 deletions packages/graphql-server/src/rowDiffs/rowDiff.resolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,15 +84,15 @@ export class RowDiffResolver {
const rows = await getRowsForDiff(query, {
...dbArgs,
tableName,
refName: toCommitId,
refName: fromCommitId,
});
return fromOneSidedTable(rows, "dropped", args.filterByRowType);
}
if (tableType === TableDiffType.Added) {
const rows = await getRowsForDiff(query, {
...dbArgs,
tableName,
refName: fromCommitId,
refName: toCommitId,
});
return fromOneSidedTable(rows, "added", args.filterByRowType);
}
Expand Down Expand Up @@ -153,10 +153,10 @@ async function resolveRefs(
type?: CommitDiffType,
): Promise<{ fromCommitId: string; toCommitId: string }> {
if (type === CommitDiffType.ThreeDot) {
const fromCommitId = await query(hashOf, [fromRefName]);
const toCommitId = await query(mergeBase, [toRefName, fromRefName]);
const toCommitId = await query(hashOf, [fromRefName]);
const mergeBaseCommit = await query(mergeBase, [toRefName, fromRefName]);
return {
fromCommitId: Object.values(fromCommitId[0])[0],
fromCommitId: Object.values(mergeBaseCommit[0])[0],
toCommitId: Object.values(toCommitId[0])[0],
};
}
Expand Down
12 changes: 5 additions & 7 deletions packages/web/lib/urls.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,11 @@ export const releases = (p: ps.OptionalRefParams): Route =>
database(p).addStatic("releases").withQuery({ refName: p.refName });

export const pulls = (p: ps.PullParams): Route =>
database(p)
.addStatic("pulls")
.withQuery({
refName: p.refName,
from: p.fromBranchName,
to: p.toBranchName,
});
database(p).addStatic("pulls").withQuery({
refName: p.refName,
from: p.fromBranchName,
to: p.toBranchName,
});

export const newRelease = (p: ps.OptionalRefParams): Route =>
releases(p).addStatic("new").withQuery({ refName: p.refName });
Expand Down

0 comments on commit aba6a2e

Please sign in to comment.