Skip to content

Code Updater for the sandbox repositories in github.com/neo4j-graph-examples

License

Notifications You must be signed in to change notification settings

neo4j-contrib/sandbox-code-updater

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sandbox Code Batch Updater

CI

Scope

The sandbox code batch updater is a Spring Boot application that watches a set of sandbox repositories and creates pull requests with sample code changes whenever necessary (typically via a CI pipeline).

Note
Sandboxes typically live in https://github.com/neo4j-graph-examples/ and feature specific datasets and queries, as well as code samples. These samples need to be regularly updated to keep up with the driver changes.

The samples are declined in all the languages that the Neo4j Drivers officially support. They are based on the code samples versioned here and tailored to every sandbox, based on the metadata they each define in their README files (via a specific Asciidoc code listing).

Prerequisites

  • JDK 11+

  • Apache Maven

  • Git CLI is installed

Relevant Configuration

If you want to learn more about the flexibility of Spring Boot configuration, read this.

Name Environment variable syntax Default value (or N/A) Comments

sandbox.repositories

SANDBOX_REPOSITORIES

(see file)

List of sandbox Git repository URIs. Better use application.yml as lists are easier to express in YAML. Please use the HTTP form of URIs in Github Actions CI as token-based authentication will not work otherwise. SSH URIs are fine when used locally.

sandbox.code-samples-path

SANDBOX_CODE_SAMPLES_PATH

N/A

Path to the local clone of the sandbox template repository.

github.address

GITHUB_ADDRESS

https://api.github.com

Base URI of Github APIs.

github.username

GITHUB_USERNAME

N/A

Name of the Github account used for authenticating pull requests. This is typically provided as a secret in CI.

github.token

GITHUB_TOKEN

N/A

Personal access token of the Github account used for authenticating pull requests. The public_repo scope is usually enough. This is typically provided as a secret in CI.

Run this

Once you have configured the application in CI or to your local setup (see above), just run:

mvn spring-boot:run
Note
Fork sandboxes and configure the app with those if you just want to test stuff

About

Code Updater for the sandbox repositories in github.com/neo4j-graph-examples

Resources

License

Stars

Watchers

Forks

Languages