Getting the Project of a Pull Request #2048
Replies: 2 comments 3 replies
-
There isn't currently an API to do what you would like to. Can you use labels to assign a project? If so, the |
Beta Was this translation helpful? Give feedback.
-
I think it's possible using query {
resource(url:"https://github.com/gr2m/sandbox/pull/177") {
... on PullRequest {
projectCards {
nodes {
note
column {
project {
databaseId
url
}
}
}
}
}
}
} result looks like this {
"data": {
"resource": {
"projectCards": {
"nodes": [
{
"note": null,
"column": {
"project": {
"databaseId": 2178975,
"url": "https://github.com/gr2m/sandbox/projects/1"
}
}
}
]
}
}
}
} You can send GraphQL queries using You can experiment creating your query at https://docs.github.com/en/graphql/overview/explorer |
Beta Was this translation helpful? Give feedback.
-
Hi all, I'm building a GitHub Action to validate my pull requests but I'm having trouble checking if the PR is in a project. The project assigned to the PR doesn't appear anywhere in the PRs schema when retrieved from the REST service.
In my below code you can see what I'm trying to achieve. The first check works, the second check does not since there's no "projects" field on the returned object.
Any and all help is appreciated.
Beta Was this translation helpful? Give feedback.
All reactions