deps(npm)(deps-dev): bump terser from 5.39.2 to 5.44.1 #88
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: Community | |
| on: | |
| issues: | |
| types: [opened, labeled] | |
| pull_request_target: | |
| types: [opened, labeled] | |
| discussion: | |
| types: [created] | |
| permissions: | |
| issues: write | |
| pull-requests: write | |
| discussions: write | |
| jobs: | |
| welcome: | |
| runs-on: ubuntu-latest | |
| if: github.event.action == 'opened' | |
| steps: | |
| - name: Welcome new contributors | |
| uses: actions/github-script@v7 | |
| with: | |
| script: | | |
| const { owner, repo } = context.repo; | |
| // Check if user has contributed before | |
| const contributions = await github.rest.search.issuesAndPullRequests({ | |
| q: `author:${context.payload.sender.login} repo:${owner}/${repo}`, | |
| per_page: 1 | |
| }); | |
| const isFirstTime = contributions.data.total_count <= 1; | |
| if (isFirstTime) { | |
| let message = ""; | |
| if (context.eventName === 'issues') { | |
| message = `👋 Thanks for opening your first issue here! | |
| We appreciate you taking the time to report this. A maintainer will take a look and respond as soon as possible. | |
| In the meantime, please make sure you've provided all the necessary information and consider checking our [documentation](https://fetch-php.thavarshan.com) if you haven't already.`; | |
| } else if (context.eventName === 'pull_request_target') { | |
| message = `🎉 Thanks for your first pull request! | |
| We appreciate your contribution to Fetch PHP. A maintainer will review your changes and provide feedback soon. | |
| Please make sure: | |
| - [ ] Tests pass | |
| - [ ] Code follows our style guidelines | |
| - [ ] Documentation is updated if needed | |
| Don't worry if this is your first contribution - we're here to help! 🚀`; | |
| } | |
| if (message) { | |
| await github.rest.issues.createComment({ | |
| owner, | |
| repo, | |
| issue_number: context.payload.number || context.payload.issue.number, | |
| body: message | |
| }); | |
| } | |
| } | |
| auto-label: | |
| runs-on: ubuntu-latest | |
| if: github.event.action == 'opened' | |
| steps: | |
| - name: Auto-label issues and PRs | |
| uses: actions/github-script@v7 | |
| with: | |
| script: | | |
| const { owner, repo } = context.repo; | |
| const title = context.payload.issue?.title || context.payload.pull_request?.title || ''; | |
| const body = context.payload.issue?.body || context.payload.pull_request?.body || ''; | |
| const issueNumber = context.payload.issue?.number || context.payload.pull_request?.number; | |
| if (!issueNumber) return; | |
| const labels = []; | |
| // Auto-label based on title/content | |
| if (title.toLowerCase().includes('docs') || title.toLowerCase().includes('documentation')) { | |
| labels.push('documentation'); | |
| } | |
| if (title.toLowerCase().includes('performance') || body.toLowerCase().includes('slow') || body.toLowerCase().includes('performance')) { | |
| labels.push('performance'); | |
| } | |
| if (title.toLowerCase().includes('security') || body.toLowerCase().includes('security') || body.toLowerCase().includes('vulnerability')) { | |
| labels.push('security'); | |
| } | |
| if (title.toLowerCase().includes('breaking') || body.toLowerCase().includes('breaking change')) { | |
| labels.push('breaking-change'); | |
| } | |
| if (body.toLowerCase().includes('composer') || body.toLowerCase().includes('dependency')) { | |
| labels.push('dependencies'); | |
| } | |
| // Add needs-triage to all new issues | |
| if (context.eventName === 'issues') { | |
| labels.push('needs-triage'); | |
| } | |
| if (labels.length > 0) { | |
| await github.rest.issues.addLabels({ | |
| owner, | |
| repo, | |
| issue_number: issueNumber, | |
| labels | |
| }); | |
| } | |
| thank-you: | |
| runs-on: ubuntu-latest | |
| if: github.event.action == 'labeled' && contains(github.event.label.name, 'good first issue') | |
| steps: | |
| - name: Thank contributor for easy issues | |
| uses: actions/github-script@v7 | |
| with: | |
| script: | | |
| const message = `🌟 This issue has been marked as a "good first issue"! | |
| This means it's a great opportunity for newcomers to contribute to Fetch PHP. | |
| **New contributors welcome!** | |
| - Check out our [Contributing Guide](CONTRIBUTING.md) | |
| - Join our discussions if you have questions | |
| - Don't hesitate to ask for help if you need it | |
| Thank you for helping make this project more accessible! 🙏`; | |
| await github.rest.issues.createComment({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| issue_number: context.payload.issue.number, | |
| body: message | |
| }); | |
| discussion-welcome: | |
| runs-on: ubuntu-latest | |
| if: github.event.action == 'created' && github.event.discussion | |
| steps: | |
| - name: Welcome to discussions | |
| uses: actions/github-script@v7 | |
| with: | |
| script: | | |
| // Check if user has participated in discussions before | |
| const discussions = await github.rest.search.issuesAndPullRequests({ | |
| q: `author:${context.payload.sender.login} repo:${context.repo.owner}/${context.repo.repo} type:discussion`, | |
| per_page: 1 | |
| }); | |
| const isFirstDiscussion = discussions.data.total_count <= 1; | |
| if (isFirstDiscussion) { | |
| const message = `👋 Welcome to Fetch PHP discussions! | |
| Thanks for starting this discussion. This is a great place to: | |
| - Ask questions about using the library | |
| - Share ideas for new features | |
| - Get help with implementation | |
| - Connect with other users | |
| A maintainer or community member will respond soon. Happy coding! 🚀`; | |
| // Note: GitHub's REST API doesn't support discussion comments yet | |
| // This would need to use GraphQL API or wait for REST API support | |
| console.log('Would post welcome message to discussion:', message); | |
| } |