Skip to content

Commit f62f139

Browse files
committed
Update GraphQL query in get-project-column-ids.yml to retrieve fields instead of items for improved data handling
1 parent 6ad28b1 commit f62f139

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

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

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,11 @@ jobs:
101101
const columnsQuery = `query($projectId: ID!) {
102102
node(id: $projectId) {
103103
... on ProjectV2 {
104-
items(first: 10) {
104+
fields(first: 10) {
105105
nodes {
106106
id
107107
name
108+
dataType
108109
}
109110
}
110111
}
@@ -113,10 +114,10 @@ jobs:
113114
114115
const columnsResult = await github.graphql(columnsQuery, { projectId });
115116
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
117+
if (columnsResult.node && columnsResult.node.fields.nodes.length) {
118+
columns[projectName] = columnsResult.node.fields.nodes.map(field => ({
119+
id: field.id,
120+
name: field.name
120121
}));
121122
}
122123
}

0 commit comments

Comments
 (0)