feat: add undo/redo support for editing actions #701
Workflow file for this run
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: 👋 PR Welcome Bot | |
| on: | |
| pull_request_target: | |
| types: [opened] | |
| permissions: | |
| pull-requests: write | |
| issues: write | |
| concurrency: | |
| group: pr-welcome-${{ github.event.pull_request.number }} | |
| cancel-in-progress: false | |
| jobs: | |
| welcome: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Post welcome comment | |
| uses: actions/github-script@v9 | |
| with: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| script: | | |
| const pr = context.payload.pull_request; | |
| const owner = context.repo.owner; | |
| const repo = context.repo.repo; | |
| const number = pr.number; | |
| const author = pr.user.login; | |
| if (pr.user.type === 'Bot') return; | |
| const MARKER = '<!-- pr-welcome-reframe-v1 -->'; | |
| const { data: existing } = await github.rest.issues.listComments({ | |
| owner, repo, issue_number: number, per_page: 100 | |
| }); | |
| if (existing.some(c => c.body.includes(MARKER))) return; | |
| const body = pr.body || ''; | |
| const isGssoc = body.toLowerCase().includes('gssoc') || | |
| (pr.head.ref || '').toLowerCase().includes('gssoc'); | |
| const comment = [ | |
| MARKER, | |
| `## 👋 Thanks for your PR, @${author}!`, | |
| ``, | |
| `Welcome to **Reframe** — a browser-based video editor built for everyone 🎬`, | |
| ``, | |
| `${isGssoc ? '> 🟠 **GSSoC\'26 PR detected** — thanks for contributing under GirlScript Summer of Code 2026!' : ''}`, | |
| ``, | |
| `### What happens next`, | |
| ``, | |
| `1. 🤖 **Automated checks** — build & TypeScript typecheck will run automatically`, | |
| `2. ✅ **Vercel preview** — a preview deployment will be created (requires maintainer authorization for fork PRs)`, | |
| `3. 👀 **Code review** — a maintainer will review your changes`, | |
| `4. 🚀 **Merge** — once approved, your PR will be merged!`, | |
| ``, | |
| `### Quick checklist`, | |
| ``, | |
| `- [ ] PR title follows [Conventional Commits](https://www.conventionalcommits.org/) (e.g. \`feat: add dark mode\`)`, | |
| `- [ ] Linked the issue this PR closes (e.g. \`Closes #123\`)`, | |
| `- [ ] Tested the changes locally (\`bun run dev\`)`, | |
| `- [ ] Build passes (\`bun run build\`)`, | |
| ``, | |
| `### Useful links`, | |
| ``, | |
| `- 📖 [CONTRIBUTING.md](https://github.com/${owner}/${repo}/blob/main/CONTRIBUTING.md)`, | |
| `- 🐛 [Open Issues](https://github.com/${owner}/${repo}/issues)`, | |
| `- ⭐ [Star the repo](https://github.com/${owner}/${repo}) to support the project!`, | |
| ``, | |
| `Happy coding! 🎉`, | |
| ].join('\n'); | |
| await github.rest.issues.createComment({ | |
| owner, repo, issue_number: number, body: comment | |
| }); | |
| if (isGssoc) { | |
| try { | |
| await github.rest.issues.addLabels({ | |
| owner, repo, issue_number: number, labels: ["gssoc'26"] | |
| }); | |
| } catch (e) { | |
| core.warning(`Failed adding gssoc label: ${e?.message}`); | |
| } | |
| } |