-
Notifications
You must be signed in to change notification settings - Fork 0
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
GitHub Issues: Scripts for working with Sub-Issues and Issue Types | josh-ops #46
Comments
oddly, i couldn’t make the api work despite adding the correct headers. i wonder if i’ve done something wrong? |
@iantanwx How are you calling it or do you have an example? I'll test it from my side too to see if I can replicate! |
@iantanwx I would double check your query - I'm having success with something like this: gh api graphql -H GraphQL-Features:issue_types -f owner="joshjohanning-org" -f repository="migrating-ado-to-gh-issues-v2" -F number="5" -f query='
query ($owner: String!, $repository: String!, $number: Int!) {
repository(owner: $owner, name: $repository) {
issue(number: $number) {
title
number
url
id
issueType {
name
}
}
}
}' Note the header: I would also double check your feature preview settings to make sure you have the New Issues Experience enabled. |
@iantanwx one final thing to note, if you're using the API (shipped on Dec 12, 2024), you need to use the sub-issue's ID field and not the NUMBER field. You have to grab the ID first, so something like: sub_issue_to_add_id=$(gh api /repos/MY-ORG-NAME/MY-REPO-NAME/issues/48 --jq .id) # the number of the issue is 48, but the id is 2885639662
gh api --method POST /repos/MY-ORG-NAME/MY-REPO-NAME/issues/46/sub_issues -F "sub_issue_id=$sub_issue_to_add_id" |
@joshjohanning I finally made it work. It turns out that although we could see the issue type in the UI, I still had to explicitly flag us into the public beta 🤷 |
GitHub Issues: Scripts for working with Sub-Issues and Issue Types | josh-ops
A collection of scripts for working with sub-issues and issue types in GitHub Issues
https://josh-ops.com/posts/github-sub-issues-and-issue-types/
The text was updated successfully, but these errors were encountered: