Skip to content

Commit

Permalink
feat: Group issue logging for better organization in index.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
austenstone committed Nov 26, 2024
1 parent f6969c1 commit 17ff41c
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { getInput, info, error } from "@actions/core";
import { getInput, info, error, group } from "@actions/core";
import { context, getOctokit } from "@actions/github";

const input = {
Expand All @@ -10,11 +10,13 @@ info(JSON.stringify(input, null, 2));
const octokit = getOctokit(input.token);

try {
const { data: issues } = await octokit.rest.issues.list(context.repo);
group("Issues", async () => {
const { data: issues } = await octokit.rest.issues.list(context.repo);

for (const issue of issues) {
info(`#${issue.number}: ${issue.title}`);
}
for (const issue of issues) {
info(`#${issue.number}: ${issue.title}`);
}
});
} catch (e) {
if (e instanceof Error) {
error(e.message);
Expand Down

0 comments on commit 17ff41c

Please sign in to comment.