Skip to content

Commit fd606ab

Browse files
committed
Update GraphQL query in get-project-column-ids.yml to use items instead of fields for improved data retrieval
1 parent c2d79a6 commit fd606ab

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

.github/workflows/get-project-column-ids.yml

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -101,12 +101,10 @@ jobs:
101101
const columnsQuery = `query($projectId: ID!) {
102102
node(id: $projectId) {
103103
... on ProjectV2 {
104-
fields(first: 10) {
104+
items(first: 10) {
105105
nodes {
106-
... on ProjectV2FieldConfiguration {
107-
id
108-
name
109-
}
106+
id
107+
title
110108
}
111109
}
112110
}
@@ -115,10 +113,10 @@ jobs:
115113
116114
const columnsResult = await github.graphql(columnsQuery, { projectId });
117115
118-
if (columnsResult.node && columnsResult.node.fields.nodes.length) {
119-
columns[projectName] = columnsResult.node.fields.nodes.map(field => ({
120-
id: field.id,
121-
name: field.name
116+
if (columnsResult.node && columnsResult.node.items.nodes.length) {
117+
columns[projectName] = columnsResult.node.items.nodes.map(item => ({
118+
id: item.id,
119+
name: item.title
122120
}));
123121
}
124122
}
@@ -131,4 +129,4 @@ jobs:
131129
});
132130
});
133131
134-
core.setOutput("columns", JSON.stringify(columns));
132+
core.setOutput("columns", JSON.stringify(columns));

0 commit comments

Comments
 (0)