-
Notifications
You must be signed in to change notification settings - Fork 159
42 lines (41 loc) · 1.22 KB
/
9c-projects.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: set 9c project default fields
on:
issues:
types:
- opened
- reopened
pull_request:
types:
- opened
- reopened
jobs:
add-to-project:
name: Add To GitHub projects
runs-on: ubuntu-latest
steps:
- name: Add project
uses: actions/[email protected]
with:
project-url: https://github.com/orgs/planetarium/projects/97
github-token: ${{ secrets.PROJECTS_PAT }}
- name: Set milestone env
run: |
echo "CURRENT_MILESTONE=$(gh api graphql -f query='query($name: String!, $owner: String!) {
repository(name: $name, owner: $owner) {
name
milestones(last: 1, states: [OPEN], orderBy: {field: DUE_DATE, direction: DESC}) {
nodes {
number
state
title
dueOn
}
}
}}' -f name=NineChronicles -f owner=planetarium --jq '.data.repository.milestones.nodes.[0].title')" >> $GITHUB_ENV
env:
GH_TOKEN: ${{ secrets.PROJECTS_PAT }}
- name: Set milestone field
uses: Julexar/[email protected]
with:
token: "${{ secrets.GITHUB_TOKEN }}"
milestone: "${{ env.CURRENT_MILESTONE }}"