Skip to content

Commit

Permalink
fix: add more trace logging when searching for latest release version (
Browse files Browse the repository at this point in the history
  • Loading branch information
chingor13 committed Apr 19, 2023
1 parent 7a0b3e9 commit c33cc81
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/manifest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1490,6 +1490,9 @@ async function latestReleaseVersion(
commitShas.add(commitWithPullRequest.sha);
const mergedPullRequest = commitWithPullRequest.pullRequest;
if (!mergedPullRequest) {
logger.trace(
`skipping commit: ${commitWithPullRequest.sha} missing merged pull request`
);
continue;
}

Expand All @@ -1498,12 +1501,20 @@ async function latestReleaseVersion(
logger
);
if (!branchName) {
logger.trace(
`skipping commit: ${commitWithPullRequest.sha} unrecognized branch name: ${mergedPullRequest.headBranchName}`
);
continue;
}

// If branchPrefix is specified, ensure it is found in the branch name.
// If branchPrefix is not specified, component should also be undefined.
if (branchName.getComponent() !== branchPrefix) {
logger.trace(
`skipping commit: ${
commitWithPullRequest.sha
} branch component ${branchName.getComponent()} doesn't match expected prefix: ${branchPrefix}`
);
continue;
}

Expand All @@ -1513,6 +1524,9 @@ async function latestReleaseVersion(
logger
);
if (!pullRequestTitle) {
logger.trace(
`skipping commit: ${commitWithPullRequest.sha} couldn't parse pull request title: ${mergedPullRequest.title}`
);
continue;
}

Expand Down

0 comments on commit c33cc81

Please sign in to comment.