[BUG] Possible bug: template engine CLI processes -c config after templates in -r already rendered
#608
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
| name: Close v4 Issues | |
| on: | |
| issues: | |
| types: [opened, edited] | |
| permissions: | |
| contents: read | |
| issues: write | |
| jobs: | |
| close-v4-issue: | |
| runs-on: ubuntu-latest | |
| if: github.event.issue.state == 'open' | |
| steps: | |
| - name: Close issues reported against v4 | |
| uses: actions/github-script@v7 | |
| with: | |
| script: | | |
| const issue = context.payload.issue; | |
| const body = issue.body || ""; | |
| const issueNumber = issue.number; | |
| const { owner, repo } = context.repo; | |
| const extractValue = (heading) => { | |
| const escapedHeading = heading.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"); | |
| const match = body.match(new RegExp(`^\\s*(?:###\\s*)?${escapedHeading}\\s*\\r?\\n+([^\\n\\r]+)`, "im")); | |
| return match ? match[1].trim() : null; | |
| }; | |
| const version = extractValue("Noctalia version"); | |
| if (!version) { | |
| core.info("No Noctalia version field found; skipping."); | |
| return; | |
| } | |
| const isV4 = /^\s*v?4(?:\s*$|[.\s(-])/i.test(version); | |
| if (!isV4) { | |
| core.info(`Noctalia version "${version}" is not v4; skipping.`); | |
| return; | |
| } | |
| const message = [ | |
| "Thanks so much for reaching out and sharing this with us!", | |
| "Right now, our team is entirely focused on building v5. Since the v4 lifecycle has officially come to an end, we are wrapping up old issues and won't be shipping any further updates or fixes to that codebase.", | |
| "We are closing this issue for now, but we truly appreciate you taking the time to report it. We aren't quite ready to open up the v5 tracker for public bug reports or feature requests just yet, but we'll definitely keep your feedback in mind as we develop the new version!", | |
| "Cheers!" | |
| ].join("\n\n"); | |
| await github.rest.issues.createComment({ | |
| owner, | |
| repo, | |
| issue_number: issueNumber, | |
| body: message | |
| }); | |
| await github.rest.issues.update({ | |
| owner, | |
| repo, | |
| issue_number: issueNumber, | |
| state: "closed", | |
| state_reason: "not_planned" | |
| }); | |
| core.info(`Closed v4 issue #${issueNumber} reported as "${version}".`); |