summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorTuowen Zhao <ztuowen@gmail.com>2022-11-05 14:55:11 -0700
committerTuowen Zhao <ztuowen@gmail.com>2022-11-05 14:55:11 -0700
commit04b8c052e5b624873b352889423c753ed1baf9c4 (patch)
tree78e14fe69e61d69709f31f91b7ae29fe8bc74477 /.github
parent1a6dcd017dbf564058a729032de3db139fcf9c7e (diff)
parent80fdbc9b91a9acca42fb90065b5e64a9722978a7 (diff)
downloadzsh-04b8c052e5b624873b352889423c753ed1baf9c4.tar.gz
zsh-04b8c052e5b624873b352889423c753ed1baf9c4.tar.bz2
zsh-04b8c052e5b624873b352889423c753ed1baf9c4.zip
Merge remote-tracking branch 'github/master'
Diffstat (limited to '.github')
-rw-r--r--.github/CODEOWNERS1
-rw-r--r--.github/workflows/main.yml3
-rw-r--r--.github/workflows/project.yml41
3 files changed, 27 insertions, 18 deletions
diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS
index 0cb9410fc..c6b3e8ce9 100644
--- a/.github/CODEOWNERS
+++ b/.github/CODEOWNERS
@@ -4,6 +4,7 @@ plugins/aws/ @maksyms
plugins/genpass/ @atoponce
plugins/git-lfs/ @hellovietduc
plugins/gitfast/ @felipec
+plugins/react-native @esthor
plugins/sdk/ @rgoldberg
plugins/shell-proxy/ @septs
plugins/universalarchive/ @Konfekt
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 50e00f9c9..57a1e3833 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -14,6 +14,9 @@ concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
+permissions:
+ contents: read # to fetch code (actions/checkout)
+
jobs:
tests:
name: Run tests
diff --git a/.github/workflows/project.yml b/.github/workflows/project.yml
index b2219893d..1d961d8c0 100644
--- a/.github/workflows/project.yml
+++ b/.github/workflows/project.yml
@@ -9,6 +9,7 @@ concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
+permissions: {}
jobs:
add-to-project:
name: Add to project
@@ -26,24 +27,25 @@ jobs:
gh api graphql -f query='
query($org: String!, $number: Int!) {
organization(login: $org){
- projectNext(number: $number) {
+ projectV2(number: $number) {
id
fields(first:20) {
nodes {
- id
- name
+ ... on ProjectV2Field {
+ id
+ name
+ }
}
}
}
}
- }
- ' -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.projectNext.id' project_data.json)
- PLUGIN_FIELD_ID=$(jq '.data.organization.projectNext.fields.nodes[] | select(.name == "Plugin") | .id' project_data.json)
- THEME_FIELD_ID=$(jq '.data.organization.projectNext.fields.nodes[] | select(.name == "Theme") | .id' project_data.json)
+ PROJECT_ID=$(jq '.data.organization.projectV2.id' project_data.json)
+ PLUGIN_FIELD_ID=$(jq '.data.organization.projectV2.fields.nodes[] | select(.name == "Plugin") | .id' project_data.json)
+ THEME_FIELD_ID=$(jq '.data.organization.projectV2.fields.nodes[] | select(.name == "Theme") | .id' project_data.json)
EOF
- name: Add to project
@@ -52,13 +54,13 @@ jobs:
run: |
item_id="$(gh api graphql -f query='
mutation($project: ID!, $content: ID!) {
- addProjectNextItem(input: {projectId: $project, contentId: $content}) {
- projectNextItem {
+ addProjectV2ItemById(input: {projectId: $project, contentId: $content}) {
+ item {
id
}
}
}
- ' -f project=$PROJECT_ID -f content=$ISSUE_OR_PR_ID --jq '.data.addProjectNextItem.projectNextItem.id')"
+ ' -f project=$PROJECT_ID -f content=$ISSUE_OR_PR_ID --jq '.data.addProjectV2ItemById.item.id')"
echo "ITEM_ID=$item_id" >> $GITHUB_ENV
@@ -107,23 +109,27 @@ jobs:
$theme_field: ID!
$theme_value: String!
) {
- set_plugin: updateProjectNextItemField(input: {
+ set_plugin: updateProjectV2ItemFieldValue(input: {
projectId: $project
itemId: $item
fieldId: $plugin_field
- value: $plugin_value
+ value: {
+ text: $plugin_value
+ }
}) {
- projectNextItem {
+ projectV2Item {
id
}
}
- set_theme: updateProjectNextItemField(input: {
+ set_theme: updateProjectV2ItemFieldValue(input: {
projectId: $project
itemId: $item
fieldId: $theme_field
- value: $theme_value
+ value: {
+ text: $theme_value
+ }
}) {
- projectNextItem {
+ projectV2Item {
id
}
}
@@ -132,4 +138,3 @@ jobs:
-f plugin_field=$PLUGIN_FIELD_ID -f plugin_value=$PLUGIN \
-f theme_field=$THEME_FIELD_ID -f theme_value=$THEME \
--silent
-