docs: improve installation guide and add comprehensive testing docume… #27
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: Project Automation | |
| on: | |
| issues: | |
| types: [opened, labeled] | |
| pull_request: | |
| types: [opened, closed] | |
| jobs: | |
| issue-automation: | |
| runs-on: ubuntu-latest | |
| if: github.event_name == 'issues' && github.event.action == 'opened' | |
| steps: | |
| - name: Auto-assign labels based on title | |
| uses: actions/github-script@v7 | |
| with: | |
| script: | | |
| const title = context.payload.issue.title.toLowerCase(); | |
| const labels = []; | |
| // Auto-assign labels based on title patterns | |
| if (title.includes('[bug]') || title.includes('bug:')) { | |
| labels.push('bug'); | |
| } | |
| if (title.includes('[feature]') || title.includes('feature:')) { | |
| labels.push('enhancement'); | |
| } | |
| if (title.includes('[template]') || title.includes('template:')) { | |
| labels.push('template'); | |
| } | |
| if (title.includes('[version]') || title.includes('version:')) { | |
| labels.push('version-update'); | |
| } | |
| if (labels.length > 0) { | |
| await github.rest.issues.addLabels({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| issue_number: context.issue.number, | |
| labels: labels | |
| }); | |
| } | |
| - name: Welcome new contributors | |
| uses: actions/github-script@v7 | |
| with: | |
| script: | | |
| // Check if this is the user's first issue | |
| const issues = await github.rest.issues.listForRepo({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| creator: context.payload.issue.user.login, | |
| state: 'all', | |
| per_page: 10 | |
| }); | |
| if (issues.data.length === 1) { | |
| await github.rest.issues.createComment({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| issue_number: context.issue.number, | |
| body: `👋 Welcome to Peezy CLI! Thanks for opening your first issue. | |
| A maintainer will review this issue soon. We appreciate your contribution! 🚀` | |
| }); | |
| } | |
| pr-automation: | |
| runs-on: ubuntu-latest | |
| if: github.event_name == 'pull_request' | |
| steps: | |
| - name: Auto-assign labels to PR | |
| uses: actions/github-script@v7 | |
| if: github.event.action == 'opened' | |
| with: | |
| script: | | |
| const title = context.payload.pull_request.title.toLowerCase(); | |
| const labels = []; | |
| // Auto-assign labels based on PR title | |
| if (title.includes('fix') || title.includes('bug')) { | |
| labels.push('bug'); | |
| } | |
| if (title.includes('feat') || title.includes('feature')) { | |
| labels.push('enhancement'); | |
| } | |
| if (title.includes('docs') || title.includes('documentation')) { | |
| labels.push('documentation'); | |
| } | |
| if (labels.length > 0) { | |
| await github.rest.issues.addLabels({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| issue_number: context.payload.pull_request.number, | |
| labels: labels | |
| }); | |
| } | |
| - name: Thank contributor on merge | |
| uses: actions/github-script@v7 | |
| if: github.event.action == 'closed' && github.event.pull_request.merged | |
| with: | |
| script: | | |
| await github.rest.issues.createComment({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| issue_number: context.payload.pull_request.number, | |
| body: `🎉 Thank you for your contribution! Your changes have been merged. 🚀` | |
| }); |