Skip to content

[BUG] Sun Spot Number Incorrect #6

[BUG] Sun Spot Number Incorrect

[BUG] Sun Spot Number Incorrect #6

Workflow file for this run

name: Close Issue

Check failure on line 1 in .github/workflows/close-issue.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/close-issue.yml

Invalid workflow file

(Line: 19, Col: 9): Unexpected value 'permissions'
on:
issue_comment:
types: [created]
jobs:
close-issue:
if: github.repository == 'accius/openhamclock'
runs-on: ubuntu-latest
# Only trigger on '/close' comments on issues (not PRs)
# Note: Using both conditions in the same if block
steps:
- name: Check comment body
if: |
github.event.comment.body == '/close' &&
github.event.issue.pull_request == null
uses: actions/github-script@v7
permissions:
issues: write
with:
script: |
const { actor } = context;
const issueNumber = context.issue.number;
// Close the issue
await github.rest.issues.update({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: issueNumber,
state: 'closed',
state_reason: 'completed'
});
// React with ✅ so they know it worked
await github.rest.reactions.createForIssueComment({
owner: context.repo.owner,
repo: context.repo.repo,
comment_id: context.payload.comment.id,
content: 'rocket'
});
console.log(`${actor} closed issue #${issueNumber}`);