docs: Add CONTRIBUTING.md for contributor
#72
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: Auto Assign Milestone | |
| on: | |
| issues: | |
| types: [opened] | |
| pull_request: | |
| types: [opened] | |
| permissions: | |
| issues: write | |
| pull-requests: write | |
| contents: read | |
| jobs: | |
| assign-milestone: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Assign current milestone | |
| uses: actions/github-script@v7 | |
| with: | |
| script: | | |
| const milestones = await github.rest.issues.listMilestones({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| state: 'open', | |
| sort: 'due_on', | |
| direction: 'asc' | |
| }); | |
| if (milestones.data.length > 0) { | |
| const currentMilestone = milestones.data[0]; | |
| try { | |
| await github.rest.issues.update({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| issue_number: context.issue.number, | |
| milestone: currentMilestone.number | |
| }); | |
| } catch (error) { | |
| console.error('Failed to update issue with milestone:', error); | |
| } | |
| } |