You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# This is the default for compatibility reasons; this is probably wrong but...
40
+
default: SpiNNakerManchester
41
+
description: >
42
+
The name of the organisation that owns the project.
34
43
project_number:
35
44
type: number
36
45
required: true
37
46
description: >
38
47
The identifier of the project to add the PR to in the organisation being run in.
48
+
status_field:
49
+
type: string
50
+
required: false
51
+
default: Status
52
+
description: >
53
+
The name of the "status" field, in case that is something other than the default.
39
54
status_to_change_to:
40
55
type: string
41
56
required: false
42
57
default: Ready To Review
43
58
description: >
44
-
The name of the option to select in as the Status field. This workflow assumes that the project has a single select field called "Status" that includes an option that this value specifies.
59
+
The name of the option to select in as the Status field.
60
+
This workflow assumes that the project has a single select field called "Status" (or whatever the status_field input names it as) that includes an option that this value specifies.
45
61
secrets:
46
62
personal_access_token:
47
63
required: true
@@ -54,11 +70,14 @@ jobs:
54
70
steps:
55
71
- name: Get project data
56
72
env:
57
-
# Aur
58
73
GH_TOKEN: ${{ secrets.personal_access_token }}
59
-
ORGANIZATION: SpiNNakerManchester
74
+
ORGANIZATION: ${{ inputs.organisation }}
60
75
PROJECT_NUMBER: ${{ inputs.project_number }}
61
-
# Uses [GitHub CLI](https://cli.github.com/manual/) to query the API for the ID of the project and return the name and ID of the first 20 fields in the project. `fields` returns a union and the query uses inline fragments (`... on`) to return information about any `ProjectV2Field` and `ProjectV2SingleSelectField` fields. The response is stored in a file called `project_data.json`.
76
+
STATUS_FIELD: ${{ inputs.status_field }}
77
+
STATUS_VALUE: ${{ inputs.status_to_change_to }}
78
+
# Uses [GitHub CLI](https://cli.github.com/manual/) to query the API for the ID of the project and return the name and ID of the first 20 fields in the project.
79
+
# `fields` returns a union and the query uses inline fragments (`... on`) to return information about any `ProjectV2Field` and `ProjectV2SingleSelectField` fields.
80
+
# The response is stored in a file called `project_data.json` that is parsed to get the relevant IDs that are stored as environment variables.
# Parses the response from the API query and stores the relevant IDs as environment variables.
89
-
# **Note:** This workflow assumes that you have a project with a single select field called "Status" that includes an option specified in inputs.status_to_change_to.
# Uses [GitHub CLI](https://cli.github.com/manual/) and the API to add the pull request that triggered this workflow to the project. The `jq` flag parses the response to get the ID of the created item.
114
+
# Uses [GitHub CLI](https://cli.github.com/manual/) and the API to add the pull request that triggered this workflow to the project.
115
+
# The `jq` flag parses the response to get the ID of the created item.
100
116
run: |
101
117
item_id="$( gh api graphql -f query='
102
118
mutation($project:ID!, $pr:ID!) {
@@ -113,7 +129,7 @@ jobs:
113
129
- name: Set fields
114
130
env:
115
131
GH_TOKEN: ${{ secrets.personal_access_token }}
116
-
# Sets the value of the `Status` field to `Ready to Review`.
132
+
# Sets the value of the `Status` field to `Ready to Review`. (Or whatever the field and value are called)
0 commit comments