add debug lines

This commit is contained in:
Peter Evans 2024-07-26 10:49:53 +00:00
parent 27642d5a9e
commit 6c03c11aff
2 changed files with 4 additions and 0 deletions

2
dist/index.js vendored
View file

@ -522,12 +522,14 @@ function createPullRequest(inputs) {
core.debug(`Changed files: '${JSON.stringify(changedFiles)}'`);
core.debug(`Deleted files: '${JSON.stringify(deletedFiles)}'`);
for (const file of changedFiles) {
core.debug(`Reading contents of file: '${file}'`);
fileChanges.additions.push({
path: file,
contents: btoa(fs.readFileSync(file, 'utf8'))
});
}
for (const file of deletedFiles) {
core.debug(`Marking file as deleted: '${file}'`);
fileChanges.deletions.push({
path: file
});

View file

@ -324,6 +324,7 @@ export async function createPullRequest(inputs: Inputs): Promise<void> {
core.debug(`Deleted files: '${JSON.stringify(deletedFiles)}'`)
for (const file of changedFiles) {
core.debug(`Reading contents of file: '${file}'`)
fileChanges.additions!.push({
path: file,
contents: btoa(fs.readFileSync(file, 'utf8'))
@ -331,6 +332,7 @@ export async function createPullRequest(inputs: Inputs): Promise<void> {
}
for (const file of deletedFiles) {
core.debug(`Marking file as deleted: '${file}'`)
fileChanges.deletions!.push({
path: file
})