update log messages

This commit is contained in:
Peter Evans 2024-09-18 15:57:56 +00:00
parent 51d5008576
commit 37c6374aa7
2 changed files with 6 additions and 2 deletions

3
dist/index.js vendored
View file

@ -1372,6 +1372,7 @@ class GitHubHelper {
const treeObjects = yield Promise.all(commit.changes.map((_a) => __awaiter(this, [_a], void 0, function* ({ path, mode, status, dstSha }) {
if (mode === '160000') {
// submodule
core.info(`Creating tree object for submodule commit at '${path}'`);
return {
path,
mode,
@ -1385,13 +1386,13 @@ class GitHubHelper {
try {
const { data: blob } = yield blobCreationLimit(() => this.octokit.rest.git.createBlob(Object.assign(Object.assign({}, repository), { content: utils.readFileBase64([repoPath, path]), encoding: 'base64' })));
sha = blob.sha;
core.info(`Created blob for file '${path}'`);
}
catch (error) {
core.error(`Error creating blob for file '${path}': ${utils.getErrorMessage(error)}`);
throw error;
}
}
core.info(`Creating tree object for blob at '${path}' with status '${status}'`);
return {
path,
mode,

View file

@ -258,6 +258,7 @@ export class GitHubHelper {
commit.changes.map(async ({path, mode, status, dstSha}) => {
if (mode === '160000') {
// submodule
core.info(`Creating tree object for submodule commit at '${path}'`)
return <TreeObject>{
path,
mode,
@ -276,7 +277,6 @@ export class GitHubHelper {
})
)
sha = blob.sha
core.info(`Created blob for file '${path}'`)
} catch (error) {
core.error(
`Error creating blob for file '${path}': ${utils.getErrorMessage(error)}`
@ -284,6 +284,9 @@ export class GitHubHelper {
throw error
}
}
core.info(
`Creating tree object for blob at '${path}' with status '${status}'`
)
return <TreeObject>{
path,
mode,