Add fuzz tests for fund_invoice
#109
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: Mainnet checklist sync | |
| on: | |
| issues: | |
| types: [closed, reopened] | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| issues: read | |
| pull-requests: read | |
| jobs: | |
| sync: | |
| runs-on: namespace-profile-nursca | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/github-script@v7 | |
| with: | |
| script: | | |
| const fs = require('fs'); | |
| const path = 'docs/mainnet-launch-checklist.md'; | |
| const owner = context.repo.owner; | |
| const repo = context.repo.repo; | |
| let text = fs.readFileSync(path, 'utf8'); | |
| const issues = [...new Set([...text.matchAll(/issues\/(\d+)/g)].map((match) => Number(match[1])))]; | |
| const states = new Map(); | |
| for (const issue_number of issues) { | |
| const { data } = await github.rest.issues.get({ owner, repo, issue_number }); | |
| states.set(issue_number, data.state); | |
| } | |
| const updated = text.split('\n').map((line) => { | |
| if (!line.startsWith('|') || !line.includes('/issues/')) return line; | |
| const issueMatch = line.match(/issues\/(\d+)/); | |
| if (!issueMatch) return line; | |
| const issueNumber = Number(issueMatch[1]); | |
| const state = states.get(issueNumber); | |
| if (!state) return line; | |
| const cells = line.split('|'); | |
| if (cells.length < 6) return line; | |
| cells[4] = ` ${state === 'closed' ? 'Complete' : 'In progress'} `; | |
| return cells.join('|'); | |
| }).join('\n'); | |
| if (updated !== text) { | |
| fs.writeFileSync(path, updated); | |
| } | |
| - name: Commit checklist update | |
| run: | | |
| if git diff --quiet -- docs/mainnet-launch-checklist.md; then | |
| echo "No checklist changes." | |
| exit 0 | |
| fi | |
| git config user.name "github-actions[bot]" | |
| git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
| git add docs/mainnet-launch-checklist.md | |
| git commit -m "Update mainnet checklist issue statuses" | |
| git push |