mirror of
https://github.com/dorny/test-reporter.git
synced 2026-02-04 20:15:23 -08:00
Add info log when fetching git tree
This commit is contained in:
9
dist/index.js
generated
vendored
9
dist/index.js
generated
vendored
@@ -1480,7 +1480,8 @@ async function downloadArtifact(octokit, artifactId, fileName, token) {
|
|||||||
}
|
}
|
||||||
exports.downloadArtifact = downloadArtifact;
|
exports.downloadArtifact = downloadArtifact;
|
||||||
async function listFiles(octokit, sha) {
|
async function listFiles(octokit, sha) {
|
||||||
core.info('Fetching list of tracked files from GitHub');
|
core.startGroup('Fetching list of tracked files from GitHub');
|
||||||
|
try {
|
||||||
const commit = await octokit.git.getCommit({
|
const commit = await octokit.git.getCommit({
|
||||||
commit_sha: sha,
|
commit_sha: sha,
|
||||||
...github.context.repo
|
...github.context.repo
|
||||||
@@ -1488,8 +1489,14 @@ async function listFiles(octokit, sha) {
|
|||||||
const files = await listGitTree(octokit, commit.data.tree.sha, '');
|
const files = await listGitTree(octokit, commit.data.tree.sha, '');
|
||||||
return files;
|
return files;
|
||||||
}
|
}
|
||||||
|
finally {
|
||||||
|
core.endGroup();
|
||||||
|
}
|
||||||
|
}
|
||||||
exports.listFiles = listFiles;
|
exports.listFiles = listFiles;
|
||||||
async function listGitTree(octokit, sha, path) {
|
async function listGitTree(octokit, sha, path) {
|
||||||
|
const pathLog = path ? ` at ${path}` : '';
|
||||||
|
core.info(`Fetching tree ${sha}${pathLog}`);
|
||||||
let truncated = false;
|
let truncated = false;
|
||||||
let tree = await octokit.git.getTree({
|
let tree = await octokit.git.getTree({
|
||||||
recursive: 'true',
|
recursive: 'true',
|
||||||
|
|||||||
2
dist/index.js.map
generated
vendored
2
dist/index.js.map
generated
vendored
File diff suppressed because one or more lines are too long
@@ -87,16 +87,22 @@ export async function downloadArtifact(
|
|||||||
}
|
}
|
||||||
|
|
||||||
export async function listFiles(octokit: InstanceType<typeof GitHub>, sha: string): Promise<string[]> {
|
export async function listFiles(octokit: InstanceType<typeof GitHub>, sha: string): Promise<string[]> {
|
||||||
core.info('Fetching list of tracked files from GitHub')
|
core.startGroup('Fetching list of tracked files from GitHub')
|
||||||
|
try {
|
||||||
const commit = await octokit.git.getCommit({
|
const commit = await octokit.git.getCommit({
|
||||||
commit_sha: sha,
|
commit_sha: sha,
|
||||||
...github.context.repo
|
...github.context.repo
|
||||||
})
|
})
|
||||||
const files = await listGitTree(octokit, commit.data.tree.sha, '')
|
const files = await listGitTree(octokit, commit.data.tree.sha, '')
|
||||||
return files
|
return files
|
||||||
|
} finally {
|
||||||
|
core.endGroup()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async function listGitTree(octokit: InstanceType<typeof GitHub>, sha: string, path: string): Promise<string[]> {
|
async function listGitTree(octokit: InstanceType<typeof GitHub>, sha: string, path: string): Promise<string[]> {
|
||||||
|
const pathLog = path ? ` at ${path}` : ''
|
||||||
|
core.info(`Fetching tree ${sha}${pathLog}`)
|
||||||
let truncated = false
|
let truncated = false
|
||||||
let tree = await octokit.git.getTree({
|
let tree = await octokit.git.getTree({
|
||||||
recursive: 'true',
|
recursive: 'true',
|
||||||
|
|||||||
Reference in New Issue
Block a user