Skip to content

How can i close all issues set as done in my projects using the gh cli #6414

Answered by LangLangBart
yassinm asked this question in Q&A
Discussion options

You must be logged in to vote

(This answer focuses on getting the data of all open issues in a project with a status of Done for a particular user. How you then process your issues to close them is up to you).

Query_1

First we have to find out the number of the project, another possibility would be the id (see node-id GitHub Docs).

{
  user(login: "LangLangBart") {
    projectsV2(first: 100) {
      totalCount
      nodes {
        number
        id
        title
      }
    }
  }
}

Result 1

{
  "data": {
    "user": {
      "projectsV2": {
        "totalCount": 1,
        "nodes": [
          {
            "number": 2,
            "id": "PVT_kwHOBYXG0s4AHGtT",
            "title": "TestMe"
          }
        ]
     …

Replies: 2 comments 8 replies

Comment options

You must be logged in to vote
3 replies
@yassinm
Comment options

@LangLangBart
Comment options

@mislav
Comment options

Answer selected by yassinm
Comment options

You must be logged in to vote
5 replies
@yassinm
Comment options

@yassinm
Comment options

@bohjak
Comment options

@bohjak
Comment options

@bohjak
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants