Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]: Incorrect params for field isRequired under pullRequest -> statusCheckRollup -> contexts #598

Open
1 task done
Oripi opened this issue Sep 22, 2024 · 2 comments
Open
1 task done
Labels
Status: Up for grabs Issues that are ready to be worked on by anyone Type: Bug Something isn't working as documented

Comments

@Oripi
Copy link

Oripi commented Sep 22, 2024

What happened?

It looks like there's an issue with the isRequired field under repo -> pullRequests -> nodes -> statusCheckRollup -> contexts -> nodes -> isRequired

the field requires params, but they should be inferred in this context.
example query:

query ($var1: String!, $var2: String!) {
  repo: repository(owner: $var1, name: $var2) {
    pullRequests(first: 4, states: [OPEN]) {
      totalCount
      nodes {
        title
        statusCheckRollup {
          contexts(first: 50) {
            nodes {
              ... on StatusContext {
                id
                description
                # params are required here, but in this context the id of the PR is known
                isRequired
              }
            }
          }
        }
      }
    }
  }
}

Versions

octokit: 4.0.13
node: v18.17.1

Relevant log output

{
	"type": "UNPROCESSABLE",
	"path": [
		"repository",
		"pullRequests",
		"nodes",
		4,
		"statusCheckRollup",
		"contexts",
		"nodes",
		2,
		"isRequired"
	],
	"locations": [
		{
			"line": 19,
			"column": 9
		}
	],
	"message": "A pull request ID or pull request number is required."
}

Code of Conduct

  • I agree to follow this project's Code of Conduct
@Oripi Oripi added Status: Triage This is being looked at and prioritized Type: Bug Something isn't working as documented labels Sep 22, 2024
Copy link

👋 Hi! Thank you for this contribution! Just to let you know, our GitHub SDK team does a round of issue and PR reviews twice a week, every Monday and Friday! We have a process in place for prioritizing and responding to your input. Because you are a part of this community please feel free to comment, add to, or pick up any issues/PRs that are labeled with Status: Up for grabs. You & others like you are the reason all of this works! So thank you & happy coding! 🚀

@Oripi
Copy link
Author

Oripi commented Sep 22, 2024

looks like as a workaround i can pass isRequired(pullRequestNumber:1) and it'll return correct value, but it's still redundant...

@kfcampbell kfcampbell added Status: Up for grabs Issues that are ready to be worked on by anyone and removed Status: Triage This is being looked at and prioritized labels Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Up for grabs Issues that are ready to be worked on by anyone Type: Bug Something isn't working as documented
Projects
Status: 🔥 Backlog
Development

No branches or pull requests

2 participants