zipline/.github/workflows/milestone.yml

33 lines
874 B
YAML
Raw Normal View History

2023-03-22 21:41:06 -05:00
name: 'Issue/PR Milestones'
on:
pull_request:
types: [opened, reopened]
issues:
types: [opened, reopened]
jobs:
set:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/github-script@v3
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
2023-03-27 18:41:00 -05:00
const milestone = 3
2023-03-31 23:41:19 -05:00
if (context.eventName === 'issues') {
github.issues.update({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
milestone
})
} else {
github.pulls.update({
pull_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
milestone
})
}