mirror of
https://github.com/joaquinjsb/gitea-release-please-action
synced 2026-05-13 16:11:36 +02:00
committed by
GitHub
parent
748eaa1a57
commit
2023ce4d12
28
dist/index.js
vendored
28
dist/index.js
vendored
@@ -80625,10 +80625,9 @@ class GitHub {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
async mergeCommitsGraphQL(targetBranch, cursor, options = {}) {
|
async mergeCommitsGraphQL(targetBranch, cursor, options = {}) {
|
||||||
var _a;
|
var _a, _b;
|
||||||
logger_1.logger.debug(`Fetching merge commits on branch ${targetBranch} with cursor: ${cursor}`);
|
logger_1.logger.debug(`Fetching merge commits on branch ${targetBranch} with cursor: ${cursor}`);
|
||||||
const response = await this.graphqlRequest({
|
const query = `query pullRequestsSince($owner: String!, $repo: String!, $num: Int!, $maxFilesChanged: Int, $targetBranch: String!, $cursor: String) {
|
||||||
query: `query pullRequestsSince($owner: String!, $repo: String!, $num: Int!, $maxFilesChanged: Int, $targetBranch: String!, $cursor: String) {
|
|
||||||
repository(owner: $owner, name: $repo) {
|
repository(owner: $owner, name: $repo) {
|
||||||
ref(qualifiedName: $targetBranch) {
|
ref(qualifiedName: $targetBranch) {
|
||||||
target {
|
target {
|
||||||
@@ -80673,16 +80672,25 @@ class GitHub {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}`,
|
}`;
|
||||||
|
const params = {
|
||||||
cursor,
|
cursor,
|
||||||
owner: this.repository.owner,
|
owner: this.repository.owner,
|
||||||
repo: this.repository.repo,
|
repo: this.repository.repo,
|
||||||
num: 25,
|
num: 25,
|
||||||
targetBranch,
|
targetBranch,
|
||||||
maxFilesChanged: 100, // max is 100
|
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 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.`);
|
logger_1.logger.warn(`Could not find commits for branch ${targetBranch} - it likely does not exist.`);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@@ -80709,7 +80717,7 @@ class GitHub {
|
|||||||
labels: pullRequest.labels.nodes.map(node => node.name),
|
labels: pullRequest.labels.nodes.map(node => node.name),
|
||||||
files,
|
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`);
|
logger_1.logger.info(`PR #${pullRequest.number} has many files, backfilling`);
|
||||||
commit.files = await this.getCommitFiles(graphCommit.sha);
|
commit.files = await this.getCommitFiles(graphCommit.sha);
|
||||||
}
|
}
|
||||||
@@ -88683,12 +88691,14 @@ class BranchFileCache {
|
|||||||
* @returns {TreeEntry[]} The tree entries
|
* @returns {TreeEntry[]} The tree entries
|
||||||
*/
|
*/
|
||||||
async fetchTree(sha) {
|
async fetchTree(sha) {
|
||||||
const { data: { tree }, } = await this.octokit.git.getTree({
|
const { data: { tree, truncated }, } = await this.octokit.git.getTree({
|
||||||
owner: this.repository.owner,
|
owner: this.repository.owner,
|
||||||
repo: this.repository.repo,
|
repo: this.repository.repo,
|
||||||
tree_sha: sha,
|
tree_sha: sha,
|
||||||
recursive: 'false',
|
|
||||||
});
|
});
|
||||||
|
if (truncated) {
|
||||||
|
logger_1.logger.warn(`file list for tree sha ${sha} is truncated`);
|
||||||
|
}
|
||||||
return tree;
|
return tree;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@@ -114285,7 +114295,7 @@ module.exports = {};
|
|||||||
/***/ ((module) => {
|
/***/ ((module) => {
|
||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
module.exports = {"i8":"13.18.7"};
|
module.exports = {"i8":"13.19.3"};
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user