Skip to content

Commit

Permalink
update log messages
Browse files Browse the repository at this point in the history
  • Loading branch information
peter-evans committed Sep 18, 2024
1 parent 51d5008 commit 37c6374
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down
5 changes: 4 additions & 1 deletion src/github-helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -276,14 +277,16 @@ 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)}`
)
throw error
}
}
core.info(
`Creating tree object for blob at '${path}' with status '${status}'`
)
return <TreeObject>{
path,
mode,
Expand Down

0 comments on commit 37c6374

Please sign in to comment.