Skip to content

Commit

Permalink
feat(#41): workflows and branches
Browse files Browse the repository at this point in the history
  • Loading branch information
h1alexbel committed Jun 17, 2024
1 parent aa63235 commit 8c60dc8
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
15 changes: 15 additions & 0 deletions src/graph.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,25 @@ const graph = `query ($searchQuery: String!, $first: Int, $after: String) {
defaultBranchRef {
name
}
object(expression: "HEAD:.github/workflows/") {
... on Tree {
entries {
name
object {
... on Blob {
byteSize
}
}
}
}
}
primaryLanguage {
name
}
createdAt
refs(refPrefix: "refs/heads/") {
totalCount
}
defaultBranchRef {
name
target {
Expand Down
3 changes: 2 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,8 @@ function writeFiles(json) {
issues: result.issues.totalCount,
forks: result.forkCount,
stars: result.stargazerCount,
diskUsage: result.diskUsage,
branches: result.refs.totalCount,
workflows: result.object ? result.object.entries.length: 0,

Check warning on line 253 in src/index.js

View check run for this annotation

Codecov / codecov/patch

src/index.js#L253

Added line #L253 was not covered by tests
license: result.licenseInfo ? result.licenseInfo.spdxId : '',
language: result.primaryLanguage ? result.primaryLanguage.name : '',
};
Expand Down

0 comments on commit 8c60dc8

Please sign in to comment.