From 2023ce4d1237a93326e4796a1536c4acc7b54007 Mon Sep 17 00:00:00 2001 From: Google GitHub Actions Bot <72759630+google-github-actions-bot@users.noreply.github.com> Date: Mon, 18 Jul 2022 17:44:29 -0500 Subject: [PATCH] chore: build dist (#529) chore: build dist release-please-action --- dist/index.js | 94 ++++++++++++++++++++++++++++----------------------- 1 file changed, 52 insertions(+), 42 deletions(-) diff --git a/dist/index.js b/dist/index.js index 8fb9ec7..9f4c615 100644 --- a/dist/index.js +++ b/dist/index.js @@ -80625,64 +80625,72 @@ class GitHub { } } async mergeCommitsGraphQL(targetBranch, cursor, options = {}) { - var _a; + var _a, _b; logger_1.logger.debug(`Fetching merge commits on branch ${targetBranch} with cursor: ${cursor}`); - const response = await this.graphqlRequest({ - query: `query pullRequestsSince($owner: String!, $repo: String!, $num: Int!, $maxFilesChanged: Int, $targetBranch: String!, $cursor: String) { - repository(owner: $owner, name: $repo) { - ref(qualifiedName: $targetBranch) { - target { - ... on Commit { - history(first: $num, after: $cursor) { - nodes { - associatedPullRequests(first: 10) { - nodes { - number - title - baseRefName - headRefName - labels(first: 10) { - nodes { - name - } + const query = `query pullRequestsSince($owner: String!, $repo: String!, $num: Int!, $maxFilesChanged: Int, $targetBranch: String!, $cursor: String) { + repository(owner: $owner, name: $repo) { + ref(qualifiedName: $targetBranch) { + target { + ... on Commit { + history(first: $num, after: $cursor) { + nodes { + associatedPullRequests(first: 10) { + nodes { + number + title + baseRefName + headRefName + labels(first: 10) { + nodes { + name } - body - mergeCommit { - oid + } + body + mergeCommit { + oid + } + files(first: $maxFilesChanged) { + nodes { + path } - files(first: $maxFilesChanged) { - nodes { - path - } - pageInfo { - endCursor - hasNextPage - } + pageInfo { + endCursor + hasNextPage } } } - sha: oid - message - } - pageInfo { - hasNextPage - endCursor } + sha: oid + message + } + pageInfo { + hasNextPage + endCursor } } } } } - }`, + } + }`; + const params = { cursor, owner: this.repository.owner, repo: this.repository.repo, num: 25, targetBranch, maxFilesChanged: 100, // max is 100 + }; + const response = await this.graphqlRequest({ + query, + ...params, }); + if (!response) { + logger_1.logger.warn(`Did not receive a response for query: ${query}`, params); + return null; + } // if the branch does exist, return null - if (!response.repository.ref) { + if (!((_a = response.repository) === null || _a === void 0 ? void 0 : _a.ref)) { logger_1.logger.warn(`Could not find commits for branch ${targetBranch} - it likely does not exist.`); return null; } @@ -80709,7 +80717,7 @@ class GitHub { labels: pullRequest.labels.nodes.map(node => node.name), files, }; - if (((_a = pullRequest.files.pageInfo) === null || _a === void 0 ? void 0 : _a.hasNextPage) && options.backfillFiles) { + if (((_b = pullRequest.files.pageInfo) === null || _b === void 0 ? void 0 : _b.hasNextPage) && options.backfillFiles) { logger_1.logger.info(`PR #${pullRequest.number} has many files, backfilling`); commit.files = await this.getCommitFiles(graphCommit.sha); } @@ -88683,12 +88691,14 @@ class BranchFileCache { * @returns {TreeEntry[]} The tree entries */ async fetchTree(sha) { - const { data: { tree }, } = await this.octokit.git.getTree({ + const { data: { tree, truncated }, } = await this.octokit.git.getTree({ owner: this.repository.owner, repo: this.repository.repo, tree_sha: sha, - recursive: 'false', }); + if (truncated) { + logger_1.logger.warn(`file list for tree sha ${sha} is truncated`); + } return tree; } /** @@ -114285,7 +114295,7 @@ module.exports = {}; /***/ ((module) => { "use strict"; -module.exports = {"i8":"13.18.7"}; +module.exports = {"i8":"13.19.3"}; /***/ }),