Skip to content

Commit

Permalink
fine tune for comment latest available build
Browse files Browse the repository at this point in the history
  • Loading branch information
Kudo committed Sep 18, 2023
1 parent 7bdab99 commit f6685e7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion build/preview-build/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -76376,6 +76376,7 @@ async function previewAction(input = collectPreviewBuildActionInput()) {
const variables = getVariables(config, []);
const messageId = template(input.commentId, variables);
const latestEasEntity = await dbManager.getLatestEasEntityFromFingerprintAsync(currentFingerprint.hash);
(0,core.info)(`Latest found EAS entity: ${JSON.stringify(latestEasEntity, null, 2)}`);
const latestEasBuildInfo = latestEasEntity?.easBuildId
? await queryEasBuildInfoAsync(input.workingDirectory, latestEasEntity.easBuildId)
: null;
Expand Down Expand Up @@ -76533,7 +76534,7 @@ function createMessageBodyInBuilding(builds, fingerprintDiff, input) {
function createMessageBodyFingerprintCompatible(latestEasBuildInfo) {
const easBuildMessage = latestEasBuildInfo != null
? `Latest compatible build on EAS found. You can download the build from ${getBuildLogsUrl(latestEasBuildInfo)}.`
: 'Unable to find a compatible build on EAS.';
: '';
return [
`Fingerprint is compatible, no new builds are required.`,
easBuildMessage,
Expand Down
3 changes: 2 additions & 1 deletion src/actions/preview-build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ export async function previewAction(input = collectPreviewBuildActionInput()) {
const variables = getVariables(config, []);
const messageId = template(input.commentId, variables);
const latestEasEntity = await dbManager.getLatestEasEntityFromFingerprintAsync(currentFingerprint.hash);
info(`Latest found EAS entity: ${JSON.stringify(latestEasEntity, null, 2)}`);
const latestEasBuildInfo = latestEasEntity?.easBuildId
? await queryEasBuildInfoAsync(input.workingDirectory, latestEasEntity.easBuildId)
: null;
Expand Down Expand Up @@ -268,7 +269,7 @@ function createMessageBodyFingerprintCompatible(latestEasBuildInfo: BuildInfo |
const easBuildMessage =
latestEasBuildInfo != null
? `Latest compatible build on EAS found. You can download the build from ${getBuildLogsUrl(latestEasBuildInfo)}.`
: 'Unable to find a compatible build on EAS.';
: '';
return [
`Fingerprint is compatible, no new builds are required.`,
easBuildMessage,
Expand Down

0 comments on commit f6685e7

Please sign in to comment.