Skip to content

Conversation

@benbalter
Copy link
Collaborator

@benbalter benbalter commented Jun 27, 2022

GitHub recently announced a breaking change to the Projects API. projectNext will now be projectV2, in addition to changes to how field values are passed in the mutation. This PR updates the action to use the new non-preview GraphQL Schema.

One challenge, is that the value field of the mutation must now be passed as a hash, with a different key depending on the field type. This is especially challenging because (A) GraphQL keys cannot be variables, and (B) the GitHub API does not accept hash variables. To get around this, I used Actions variable interpolation to modify the GraphQL query (key and variable type) to the appropriate field type and graphql variable type prior to passing the GraphQL query string to the gh api command. This metadata is pulled from the project object, so it should be a transparent and non-breaking change for existing implementations.

You can see a successful run for multiple types of fields here.

@benbalter benbalter merged commit 2d475e0 into main Jun 27, 2022
@benbalter benbalter deleted the projectsv2 branch June 27, 2022 19:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants