Skip to content

Commit

Permalink
fix: process pr head first
Browse files Browse the repository at this point in the history
  • Loading branch information
privatenumber committed Dec 9, 2020
1 parent bdb58df commit 299fc70
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/generate-comment.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ function generateComment({
headSizeData,
}) {
const fileMap = {};
const baseTotalSize = processFiles(fileMap, 'baseSize', baseSizeData);
const headTotalSize = processFiles(fileMap, 'headSize', headSizeData);
const baseTotalSize = processFiles(fileMap, 'baseSize', baseSizeData);
const totalDelta = delta(baseTotalSize, headTotalSize);

let files = Object.values(fileMap);
Expand Down
4 changes: 2 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ async function buildRef({
const sortBy = core.getInput('sort-by') || 'delta';
const sortOrder = core.getInput('sort-order') || 'desc';

core.startGroup('Build BASE');
core.startGroup('Build HEAD');
const headSizeData = await buildRef({
buildCommand,
});
Expand All @@ -151,7 +151,7 @@ async function buildRef({
let baseSizeData;
if (await isBaseDiffFromHead(baseRef)) {
core.info('HEAD is different from BASE. Triggering build.');
core.startGroup('Build HEAD');
core.startGroup('Build BASE');
baseSizeData = await buildRef({
ref: baseRef,
buildCommand,
Expand Down

0 comments on commit 299fc70

Please sign in to comment.