[Security]: Strengthen MP4 upload validation and enforce file-size limits #51
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: Welcome New Contributors | |
| on: | |
| issues: | |
| types: [opened] | |
| pull_request: | |
| types: [opened] | |
| branches: [main] | |
| permissions: | |
| issues: write | |
| pull-requests: write | |
| jobs: | |
| welcome: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Welcome issue author | |
| if: github.event_name == 'issues' | |
| uses: actions/github-script@v7 | |
| with: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| script: | | |
| const { context, github } = require("@actions/github"); | |
| const issue = context.payload.issue; | |
| const body = | |
| `👋 Welcome to LearnHub, @${issue.user.login}! Thanks for opening this issue.\n\n` + | |
| `Please review our Contributing Guidelines (CONTRIBUTING.md) and Code of Conduct (CODE_OF_CONDUCT.md).\n\n` + | |
| `### Checklist\n` + | |
| `- [ ] Star the repository\n` + | |
| `- [ ] Fork the repository\n` + | |
| `- [ ] Read \`CONTRIBUTING.md\`\n` + | |
| `- [ ] Comment \`/assign\` if you want to work on this issue\n` + | |
| `- [ ] If you are not the issue author, add your approach along with \`/assign\`\n\n` + | |
| `If you do not get a reply in time, please join Discord and message there with your GitHub username.`; | |
| await github.rest.issues.createComment({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| issue_number: issue.number, | |
| body | |
| }); | |
| - name: Welcome pull request author | |
| if: github.event_name == 'pull_request' | |
| uses: actions/github-script@v7 | |
| with: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| script: | | |
| const { context, github } = require("@actions/github"); | |
| const pr = context.payload.pull_request; | |
| const body = | |
| `🎉 Well done, @${pr.user.login}! Thanks for raising this PR.\n\n` + | |
| `PA will review it shortly. If you do not hear back in time, please join Discord and message there with your GitHub username.\n\n` + | |
| `### Checklist\n` + | |
| `- [ ] Star the repository\n` + | |
| `- [ ] Fork the repository\n` + | |
| `- [ ] Read \`CONTRIBUTING.md\`\n` + | |
| `- [ ] Make sure the PR is linked to the relevant issue\n` + | |
| `- [ ] Make sure the PR follows the contribution rules\n\n` + | |
| `Please make sure your PR follows our Contributing Guidelines (CONTRIBUTING.md).`; | |
| await github.rest.issues.createComment({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| issue_number: pr.number, | |
| body | |
| }); |