Repo Editor
The documentation is in a very early stage and some parts might be outdated.
The divekit-repo-editor allows the subsequent adjustment of individual files over a larger number of repositories.
The editor has two different functionalities, one is to adjust a file equally in all repositories and the other is to adjust individual files in repositories based on the project name.
Setup & Run
Install NodeJs (version >= 12.0.0) which is required to run this tool. NodeJs can be acquired on the website nodejs.org.
To use this tool you have to clone this repository to your local drive.
This tool uses several libraries in order to use the Gitlab API etc. Install these libraries by running the command
npm install
in the root folder of this project.Configure Token
- Navigate to your Profile and generate an Access Token / API-Token in order to get access to the gitlab api
- Copy the Access Token
- Rename the file .env.example to .env
- Open .env and replace YOUR_API_TOKEN with the token you copied.
Configure the application via
src/main/config/
and add files toassets/
, see below for more details.To run the application navigate into the root folder of this tool and run
npm start
. All assets will be updated. Usenpm run useSetupInput
if you want to use the latest output of the automated-repo-setup as input for the edit.
Configuration
Place all files that should be edited in the corresponding directories:
input
└── assets
├── code
│ ├── PROJECT-NAME-WITH-UUID
│ │ └── <add files for a specifig student here>
│ └── ...
├── test
│ ├── PROJECT-NAME-WITH-UUID
│ │ └── <add files for a specifig student here>
│ └── ...
└── <add files for ALL repos here>
src/main/config/editorConfig.json
: Configure which groups should be updated and define the commit message:
{
"onlyUpdateTestProjects": false,
"onlyUpdateCodeProjects": false,
"groupIds": [
1862
],
"logLevel": "info",
"commitMsg": "individual update test"
}
Changelog
1.0.0
- add individual updates per project
0.1.1
- add feature to force create/update
0.1.0
- add feature to update or create files based on given structure in
asset/*/
for all repositories
0.0.1
- initialize project based on the divekit-evaluation-processor