Skip to content

Commit

Permalink
fix: Update GitHub Actions workflow permissions and restore issue ret…
Browse files Browse the repository at this point in the history
…rieval logging in index.ts
  • Loading branch information
austenstone committed Nov 26, 2024
1 parent 0ede7bb commit e4dd0fa
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/usage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ on:
pull_request:
workflow_dispatch:

permissions:
issues: read

jobs:
run:
runs-on: ubuntu-latest
Expand Down
9 changes: 4 additions & 5 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,14 @@ info(JSON.stringify(input, null, 2));
info(JSON.stringify(context.repo, null, 2));

const octokit = getOctokit(input.token);
info(JSON.stringify(octokit, null, 2));

try {
await group("Issues", async () => {
// const { data: issues } = await octokit.rest.issues.list(context.repo);
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) {
Expand Down

0 comments on commit e4dd0fa

Please sign in to comment.