feat: Add Import Functionality for Environment Variables #10
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: Hacktoberfest | |
| on: | |
| pull_request: | |
| types: [opened, labeled, unlabeled, synchronize] | |
| issues: | |
| types: [opened, labeled, unlabeled] | |
| jobs: | |
| label-checker: | |
| name: Check Hacktoberfest Labels | |
| runs-on: ubuntu-latest | |
| if: github.event_name == 'pull_request' | |
| steps: | |
| - name: Check if PR is during Hacktoberfest | |
| id: check-date | |
| run: | | |
| CURRENT_DATE=$(date +%Y-%m-%d) | |
| if [[ "$CURRENT_DATE" > "2025-09-30" && "$CURRENT_DATE" < "2025-11-01" ]]; then | |
| echo "is_hacktoberfest=true" >> $GITHUB_OUTPUT | |
| echo "π This PR is during Hacktoberfest 2025!" | |
| else | |
| echo "is_hacktoberfest=false" >> $GITHUB_OUTPUT | |
| fi | |
| - name: Check PR quality | |
| if: steps.check-date.outputs.is_hacktoberfest == 'true' | |
| uses: actions/github-script@v7 | |
| with: | |
| script: | | |
| const pr = context.payload.pull_request; | |
| // Check PR description length | |
| const descriptionLength = pr.body ? pr.body.length : 0; | |
| if (descriptionLength < 50) { | |
| core.warning('β οΈ PR description is too short. Please provide more details.'); | |
| } | |
| // Check number of files changed | |
| const filesChanged = pr.changed_files; | |
| if (filesChanged > 50) { | |
| core.warning('β οΈ Large number of files changed. Consider breaking into smaller PRs.'); | |
| } | |
| // Check if PR is from a fork | |
| if (pr.head.repo.full_name !== pr.base.repo.full_name) { | |
| core.info('β PR is from a fork (good practice)'); | |
| } | |
| core.info(`π PR Stats: ${filesChanged} files changed, ${pr.additions} additions, ${pr.deletions} deletions`); | |
| quality-check: | |
| name: Quality Check for Hacktoberfest | |
| runs-on: ubuntu-latest | |
| if: github.event_name == 'pull_request' | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Check for spam indicators | |
| run: | | |
| echo "π Checking for spam indicators..." | |
| # Check for whitespace-only changes | |
| WHITESPACE_ONLY=$(git diff origin/${{ github.base_ref }}...HEAD --ignore-all-space --ignore-blank-lines | wc -l) | |
| if [ "$WHITESPACE_ONLY" -eq 0 ]; then | |
| echo "β οΈ Warning: Changes appear to be whitespace-only" | |
| fi | |
| # Check commit messages | |
| git log origin/${{ github.base_ref }}..HEAD --pretty=format:"%s" | while read msg; do | |
| if [[ ${#msg} -lt 10 ]]; then | |
| echo "β οΈ Warning: Short commit message detected: $msg" | |
| fi | |
| done | |
| echo "β Quality check complete" | |
| - name: Comment on PR | |
| if: github.event.action == 'opened' | |
| uses: actions/github-script@v7 | |
| with: | |
| script: | | |
| const message = `## π Welcome to Hacktoberfest 2025! | |
| Thank you for your contribution to ENV Storage Manager! | |
| ### β Next Steps | |
| 1. **Review Guidelines**: Make sure your PR follows our [Contributing Guidelines](https://github.com/${context.repo.owner}/${context.repo.repo}/blob/main/CONTRIBUTING.md) | |
| 2. **Quality Check**: Ensure your changes are meaningful and add value | |
| 3. **Tests**: Add or update tests for your changes | |
| 4. **Documentation**: Update docs if needed | |
| ### π·οΈ Labels | |
| Your PR will be labeled with \`hacktoberfest-accepted\` once it's reviewed and approved by maintainers. | |
| ### β±οΈ Review Time | |
| Please be patient! We'll review your PR as soon as possible. During Hacktoberfest, we may receive a high volume of contributions. | |
| ### π Resources | |
| - [Hacktoberfest Rules](https://hacktoberfest.com/participation/) | |
| - [Code of Conduct](https://github.com/${context.repo.owner}/${context.repo.repo}/blob/main/CODE_OF_CONDUCT.md) | |
| - [Security Policy](https://github.com/${context.repo.owner}/${context.repo.repo}/blob/main/SECURITY.md) | |
| Happy coding! π`; | |
| github.rest.issues.createComment({ | |
| issue_number: context.issue.number, | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| body: message | |
| }); | |
| issue-labeler: | |
| name: Label Hacktoberfest Issues | |
| runs-on: ubuntu-latest | |
| if: github.event_name == 'issues' && github.event.action == 'opened' | |
| steps: | |
| - name: Check if during Hacktoberfest | |
| id: check-date | |
| run: | | |
| CURRENT_DATE=$(date +%Y-%m-%d) | |
| if [[ "$CURRENT_DATE" > "2025-09-30" && "$CURRENT_DATE" < "2025-11-01" ]]; then | |
| echo "is_hacktoberfest=true" >> $GITHUB_OUTPUT | |
| else | |
| echo "is_hacktoberfest=false" >> $GITHUB_OUTPUT | |
| fi | |
| - name: Add Hacktoberfest label to good first issues | |
| if: steps.check-date.outputs.is_hacktoberfest == 'true' | |
| uses: actions/github-script@v7 | |
| with: | |
| script: | | |
| const issue = context.payload.issue; | |
| const labels = issue.labels.map(l => l.name); | |
| if (labels.includes('good first issue') || labels.includes('help wanted')) { | |
| await github.rest.issues.addLabels({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| issue_number: issue.number, | |
| labels: ['hacktoberfest'] | |
| }); | |
| core.info('π Added hacktoberfest label to issue'); | |
| } |