This is a GitHub scanner for [jQAssistant](https://jqassistant.org/). It enables jQAssistant to scan and analyze GitHub repositories.
Note | This plugin requires authentication to the GitHub API by one of the options of the underlying GitHub API Library, i.e., via
|
To be able to use the plug-in, it must be specified as a plug-in to jQAssistant. Additionally, at least one GitHub repository needs to be configured to be scanned. Optionally, the branch to scan may be configured using the scanner property github.repository.branch. This property defaults to main.
jqassistant:
plugins:
- group-id: org.jqassistant.plugin # (1)artifact-id: jqassistant-github-pluginversion: ${jqassistant.github-plugin.version}scan:
properties:
github.repository.branch: master # (2)include:
urls:
- github:repository::https://github.com/shopizer-ecommerce/shopizer # (3)Dependency to the GitHub plugin
The branch to scan
The repository to scan
The plugin uses the following labels in the resulting graph:
| Label | Description |
|---|---|
GitHub | Parent label for all nodes related to the GitHub-Issues plugin. |
Branch | Represents a GitHub Branch. |
Commit | Represents a GitHub Commit. |
Issue | Represents a GitHub Issue. |
Label | Represents a GitHub Label. |
Milestone | Represents a GitHub Milestone which is a collection of Issues. |
PullRequest | Represents a Pull Request. A Pull Request always is an Issue. |
Release | Represents a GitHub Release. |
Repository | Represents a GitHub Repository. |
Tag | Represents a Git tag. |
User | Represents a GitHub User. |
Here are the possible relations between those labels:
List all your open Issues over multiple repositories:
MATCH
(r:GitHub:Repository)-[:HAS_ISSUE]->(i:GitHub:Issue{state:"OPEN"})
RETURNr.owner+"/"+r.nameASRepository, i.titleASIssueMATCH
(r:GitHub:Repository)-[:HAS_ISSUE]->(:GitHub:Issue{state:"OPEN"})
RETURNr.owner+"/"+r.nameASRepository, count(*) ASissueCountORDER BYissueCountDESCMATCH
(:GitHub:Issue{state:"OPEN"})-[:HAS_ASSIGNEE]->(u:GitHub:User)
RETURNu.usernameASUserName, count(*) ASOpenIssuesMATCH
(i:GitHub:Issue)
WHEREi.body=""RETURNi.numberASIssue, i.titleASTitleMATCH
(i:GitHub:Issue)
WHERENOT (i)-[:HAS_LABEL]->()
RETURNi.numberASIssue, i.titleASTitleMATCH
(i:GitHub:Issue{state:"CLOSED"})
RETURNi.numberASIssue, i.titleASTitle, duration.between(i.createdAt, i.closedAt)MATCH
(i:Issue{state:"OPEN"})
WHEREi.createdAt<=datetime()-duration('P30D')
RETURNi.numberASIssue, i.titleASTitleLet’s have a look at a few indicators:
MATCH
(i:GitHub:Issue{state:"OPEN"})
WHERENOT (i)-[:HAS_LABEL]->(:GitHub:Label)
RETURNi.numberASIssue, i.titleASTitleMATCH
(i:GitHub:Issue{state:"OPEN"})
WHERENOT (i)-[:HAS_ASSIGNEE]->(:GitHub:User)
RETURNi.numberASIssue, i.titleASTitle