'is it possible to get the content of a pom.xml file from github api?

i want to read the content of the pom.xml file because I need the artifactId and groupId. I am running a script that loops through a bunch of GitHub repos, and I don't want to have to clone all the repos and read the pom.xml that way.



Solution 1:[1]

Yes, it is possible. Assuming you using the GraphQL API, here is the snippet which can help you do that

repositories(first: 100, after:$after) {
        totalCount
        nodes {
          name
          url
          pom: object(expression: "master:pom.xml") {             
            ... on Blob {
                text
            }
        }
    }

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Eugene Ryzhikov