Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 22 additions & 20 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -43285,27 +43285,27 @@ async function main({
return;
}
jobs.push(async () => {
core.startGroup(`PR #${stackNode.number}`);
const stackGraph2 = getStackGraph(stackNode, repoGraph);
const output = getOutput(stackGraph2, terminatingRefs);
core.info("--- Output ---");
core.info("");
output.split("\n").forEach(core.info);
core.info("");
core.info("--- End output ---");
core.info("");
let description = stackNode.body ?? "";
description = updateDescription({
description,
output
});
core.info("--- Updated description ---");
core.info("");
description.split("\n").forEach(core.info);
core.info("");
core.info("--- End updated description ---");
core.info("");
try {
core.startGroup(`PR #${stackNode.number}`);
const stackGraph2 = getStackGraph(stackNode, repoGraph);
const output = getOutput(stackGraph2, terminatingRefs);
core.info("--- Output ---");
core.info("");
output.split("\n").forEach(core.info);
core.info("");
core.info("--- End output ---");
core.info("");
let description = stackNode.body ?? "";
description = updateDescription({
description,
output
});
core.info("--- Updated description ---");
core.info("");
description.split("\n").forEach(core.info);
core.info("");
core.info("--- End updated description ---");
core.info("");
core.info("Updating PR via GitHub API...");
const response = await octokit.rest.pulls.update({
...github.context.repo,
Expand All @@ -43324,6 +43324,8 @@ async function main({
failedJobs.push(stackNode.number);
if (error2 instanceof Error) {
core.error(`Unable to update PR: ${error2.message}`);
} else {
core.error(String(error2));
}
} finally {
core.endGroup();
Expand Down
50 changes: 26 additions & 24 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,32 +101,32 @@ export async function main({
}

jobs.push(async () => {
core.startGroup(`PR #${stackNode.number}`)

const stackGraph = getStackGraph(stackNode, repoGraph)
const output = getOutput(stackGraph, terminatingRefs)

core.info('--- Output ---')
core.info('')
output.split('\n').forEach(core.info)
core.info('')
core.info('--- End output ---')
core.info('')

let description = stackNode.body ?? ''
description = updateDescription({
description,
output,
})
try {
core.startGroup(`PR #${stackNode.number}`)

core.info('--- Updated description ---')
core.info('')
description.split('\n').forEach(core.info)
core.info('')
core.info('--- End updated description ---')
core.info('')
const stackGraph = getStackGraph(stackNode, repoGraph)
const output = getOutput(stackGraph, terminatingRefs)

core.info('--- Output ---')
core.info('')
output.split('\n').forEach(core.info)
core.info('')
core.info('--- End output ---')
core.info('')

let description = stackNode.body ?? ''
description = updateDescription({
description,
output,
})

core.info('--- Updated description ---')
core.info('')
description.split('\n').forEach(core.info)
core.info('')
core.info('--- End updated description ---')
core.info('')

try {
core.info('Updating PR via GitHub API...')
const response = await octokit.rest.pulls.update({
...github.context.repo,
Expand All @@ -147,6 +147,8 @@ export async function main({

if (error instanceof Error) {
core.error(`Unable to update PR: ${error.message}`)
} else {
core.error(String(error))
}
} finally {
core.endGroup()
Expand Down
Loading