🐞[Bug]: Resolve Next.js compilation errors, duplicate imports, and redeclarations #935
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # ────────────────────────────────────────────────────────────────────────────── | |
| # 💬 Auto Comment on Issue Close | |
| # ────────────────────────────────────────────────────────────────────────────── | |
| # | |
| # DESCRIPTION: | |
| # Automatically posts a thank-you comment on a GitHub issue the moment it | |
| # is closed — whether closed by a maintainer, a bot, or a PR merge. This | |
| # acknowledges the issue reporter and provides closure feedback. | |
| # | |
| # HOW IT WORKS: | |
| # 1. Triggers whenever any issue is closed (types: [closed]). | |
| # 2. Reads the issue creator's username and issue number from the event payload. | |
| # 3. Posts a personalized comment on the issue: | |
| # "Hello @<creator>! Your issue #<N> has been closed. | |
| # Thank you for your contribution!" | |
| # | |
| # TRIGGERS: | |
| # - Automatic : Fires instantly when any issue is closed. | |
| # | |
| # PERMISSIONS REQUIRED: | |
| # - issues: write → to post the closing comment | |
| # | |
| # SECRETS REQUIRED: | |
| # - GITHUB_TOKEN → provided automatically by GitHub, no setup needed | |
| # ────────────────────────────────────────────────────────────────────────────── | |
| name: Comment on Issue Close | |
| on: | |
| issues: | |
| types: [closed] | |
| jobs: | |
| greet-on-close: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| issues: write | |
| steps: | |
| - name: Greet User | |
| uses: actions/github-script@v9 | |
| with: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| script: | | |
| const issue = context.payload.issue; | |
| const issueCreator = issue.user.login; | |
| const issueNumber = issue.number; | |
| const greetingMessage = `Hello @${issueCreator}! Your issue #${issueNumber} has been closed. Thank you for your contribution!`; | |
| github.rest.issues.createComment({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| issue_number: issueNumber, | |
| body: greetingMessage | |
| }); |