Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
oh-my-zsh
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
github
oh-my-zsh
Commits
239e2f9f
Unverified
Commit
239e2f9f
authored
Nov 03, 2022
by
Lennart Ochel
Committed by
GitHub
Nov 03, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ci: migrate to ProjectV2 GraphQL API (#11311)
parent
50a526f2
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
13 deletions
+13
-13
project.yml
.github/workflows/project.yml
+13
-13
No files found.
.github/workflows/project.yml
View file @
239e2f9f
...
...
@@ -27,10 +27,11 @@ jobs:
gh api graphql -f query='
query($org: String!, $number: Int!) {
organization(login: $org){
project
Next
(number: $number) {
project
V2
(number: $number) {
id
fields(first:20) {
nodes {
... on ProjectV2Field {
id
name
}
...
...
@@ -38,13 +39,13 @@ jobs:
}
}
}
' -f org=$ORGANIZATION -F number=$PROJECT_NUMBER > project_data.json
}
' -f org=$ORGANIZATION -F number=$PROJECT_NUMBER > project_data.json
# Parse project data
cat >> $GITHUB_ENV <<EOF
PROJECT_ID=$(jq '.data.organization.project
Next
.id' project_data.json)
PLUGIN_FIELD_ID=$(jq '.data.organization.project
Next
.fields.nodes[] | select(.name == "Plugin") | .id' project_data.json)
THEME_FIELD_ID=$(jq '.data.organization.project
Next
.fields.nodes[] | select(.name == "Theme") | .id' project_data.json)
PROJECT_ID=$(jq '.data.organization.project
V2
.id' project_data.json)
PLUGIN_FIELD_ID=$(jq '.data.organization.project
V2
.fields.nodes[] | select(.name == "Plugin") | .id' project_data.json)
THEME_FIELD_ID=$(jq '.data.organization.project
V2
.fields.nodes[] | select(.name == "Theme") | .id' project_data.json)
EOF
-
name
:
Add to project
...
...
@@ -53,13 +54,13 @@ jobs:
run
:
|
item_id="$(gh api graphql -f query='
mutation($project: ID!, $content: ID!) {
addProject
NextItem
(input: {projectId: $project, contentId: $content}) {
projectNextI
tem {
addProject
V2ItemById
(input: {projectId: $project, contentId: $content}) {
i
tem {
id
}
}
}
' -f project=$PROJECT_ID -f content=$ISSUE_OR_PR_ID --jq '.data.addProject
NextItem.projectNextI
tem.id')"
' -f project=$PROJECT_ID -f content=$ISSUE_OR_PR_ID --jq '.data.addProject
V2ItemById.i
tem.id')"
echo "ITEM_ID=$item_id" >> $GITHUB_ENV
...
...
@@ -108,23 +109,23 @@ jobs:
$theme_field: ID!
$theme_value: String!
) {
set_plugin: updateProject
NextItemField
(input: {
set_plugin: updateProject
V2ItemFieldValue
(input: {
projectId: $project
itemId: $item
fieldId: $plugin_field
value: $plugin_value
}) {
project
Next
Item {
project
V2
Item {
id
}
}
set_theme: updateProject
NextItemField
(input: {
set_theme: updateProject
V2ItemFieldValue
(input: {
projectId: $project
itemId: $item
fieldId: $theme_field
value: $theme_value
}) {
project
Next
Item {
project
V2
Item {
id
}
}
...
...
@@ -133,4 +134,3 @@ jobs:
-f plugin_field=$PLUGIN_FIELD_ID -f plugin_value=$PLUGIN \
-f theme_field=$THEME_FIELD_ID -f theme_value=$THEME \
--silent
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment