Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Copilot Lvl 3
Message 1 of 3

Retrieve open milestones for a repo

Solved! Go to Solution.

I want to retrieve all the open milestones for a given repo. What modificatins should I do to the below query.

query{
  organization(login: "wso2") {
    repository(name: "product-apim") {
      name
      url
      milestones{
        edges {
          node {
            id,
            title
          }
        }
      } 
    }
  }
}

 

2 Replies
Solution
Copilot Lvl 3
Message 2 of 3

Re: Retrieve open milestones for a repo

query{
  organization(login: "wso2") {
    repository(name: "product-apim") {
      name
      url
      milestones (first: 100,
      states: [OPEN],
       orderBy: {field: CREATED_AT, direction: DESC},
       ){
        edges {
          node {
            id,
            title
          }
        }
      } 
    }
  }
}

Have to specify first/last value for pagination.

Community Manager
Message 3 of 3

Re: Retrieve open milestones for a repo

Hey @isharailanga, Thanks for coming back to share your solution. In the meantime, we're looking forward to seeing you around!


Best,
AndreaG

Mark helpful posts with Accept as Solution to help other users locate important info. Don't forget to give Kudos for great content!