GitLotus component -- Web service for accepting Git repositories (that should be transformed to RDF data) and providing status information about the status of tasks
The component is available as a Docker image superdose/git2rdf-listener-service. See the repository project-deployment-compose for a prepared Docker container starting and configuration script.
The Spring Boot service can be created using Apache Maven.
git clone git@github.com:git2RDFLab/ccr-listener-prototype.git
cd sparql-query-prototype
mvn package
See the folder target
for the executable JAR file.
Dependency notice: To remove duplicate database JPA definitions, a shared database commons project was introduced. See database-shared-common for installing this GitLotus-specific dependency.
The OpenAPI/Swagger documentation can be found under '/listener-service/swagger'.
Environment Variables | Description |
---|---|
SPRING_DATASOURCE_URL |
The fully qualified URL to the database. Expects the database connection string as of the defined schema by the used database. This project expects per default a Postgres database. A default value is given for local deployments. |
SPRING_DATASOURCE_PASSWORD |
The password of the database. A default value is given for local deployments. |
curl -XPOST -F "file=@gitexample.zip;name=field1;filename=gitexample.zip;type=application/zip" localhost:8080/listener-service/api/v1/git/upload
Endpoint: /listener-service/api/v1/git/upload?name=abc
curl -XPOST -F "file=@gitexample.zip;filename=gitexample.zip;type=application/zip" localhost:8080/listener-service/api/v1/git/upload?name=abc
Endpoint: /listener-service/api/v1/git/rdf/completedelete/{id}
curl -XDELETE localhost:8080/listener-service/api/v1/git/rdf/completedelete/{id}
Endpoint: /listener-service/api/v1/github
curl -XGET localhost:8080/listener-service/api/v1/github
Endpoint: /listener-service/api/v1/github/queue
curl -XPOST -H "Content-type: application/json" -d '{"owner": "dotnet", "repository": "core"}' localhost:8080/listener-service/api/v1/github/queue
Endpoint: /listener-service/api/v1/github/queue/filter
curl -XPOST -H "Content-type: application/json" -d '{"owner": "dotnet", "repository": "core", "repositoryFilter": {"githubIssueFilter": {}, "gitCommitFilter": {"enableAuthorName": true}}}' localhost:8080/listener-service/api/v1/github/queue/filter
NOTE
- when any filter is specified, all other not explicitly named filters are disabled (
false
) by default - there are currently 2 filter-types which all must be specified when using a filter
FilterName | Type |
---|---|
enableIssueId |
bool |
enableIssueState |
bool |
enableIssueTitle |
bool |
enableIssueBody |
bool |
enableIssueUser |
bool |
enableIssueLabels |
bool |
enableIssueAssignees |
bool |
enableIssueMilestone |
bool |
enableIssueCreatedAt |
bool |
enableIssueUpdatedAt |
bool |
enableIssueClosedAt |
bool |
FilterName | Type |
---|---|
enableCommitHash |
bool |
enableAuthorName |
bool |
enableAuthorEmail |
bool |
enableAuthorDate |
bool |
enableCommitDate |
bool |
enableCommitterName |
bool |
enableCommitterEmail |
bool |
enableCommitMessage |
bool |
enableCommitDiff |
bool |
enableCommitBranch |
bool |
Endpoint: /listener-service/api/v1/github/rdf/completedelete/{id}
curl -XDELETE localhost:8080/listener-service/api/v1/github/rdf/completedelete/{id}
We are happy to receive your contributions. Please create a pull request or an issue. As this tool is published under the MIT license, feel free to fork it and use it in your own projects.
This tool just temporarily stores the image data. It is provided "as is" and without any warranty, express or implied.