Skip to content

Commit

Permalink
Version 1.2
Browse files Browse the repository at this point in the history
The big change in this version are tests. In addition, there are some minor changes:

* Dry Incremental update - prints what changes
* token passing per envirement variable
* possibility to use repos without login/token
  • Loading branch information
domnik23 authored Dec 21, 2022
1 parent 232afc3 commit c58d664
Show file tree
Hide file tree
Showing 15 changed files with 24,339 additions and 33 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Test

on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
exist-version: [latest, release, 5.3.0]
services:
# Label used to access the service container
exist:
env:
tuttle_token_tuttle_sample_data: ${{ secrets.tuttle_token_tuttle_sample_data }}
image: existdb/existdb:${{ matrix.exist-version }}
ports:
- 8443:8443
steps:
- uses: actions/checkout@v2
- name: Use Node.js 14
uses: actions/setup-node@v1
with:
node-version: 14
- run: npm ci
- name: run tests
run: npm test

1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/.idea/
package-lock.json
/build
node_modules
.vscode
Expand Down
18 changes: 15 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ Synchronizes your data collection with GitHub and GitLab.
## Functionality

* Sync data collection from Git to DB
* Deal with Multi repository
* Deal with multiple repositories
* Incremental updates
* Works with private or public repositories

## Requirements

- [node](https://nodejs.org/en/): `v12+`
- [exist-db](https://www.exist-db.org): `v5.3.0+` (works with Version [GITSHA: 4a8124](https://github.com/eXist-db/exist#4a8124))
- Authtoken for git repository to use

## Building and Installation

Expand Down Expand Up @@ -56,7 +56,7 @@ An example:
<baseurl>https://api.github.com/</baseurl>
<repo>tuttle-sample-data</repo>
<owner>tuttle-sample-data</owner>
<token>XXX</token>
<token></token>
<ref>master</ref>
<hookuser>admin</hookuser>
<hookpasswd></hookpasswd>
Expand Down Expand Up @@ -90,6 +90,18 @@ Define the working branch of the git repository

#### hookuser & hookpasswd

#### token

If a token is specified Tuttle authenticates against GitHub or GitLab. When a token is not defined, Tuttle assumes a public repository without any authentication.

It is also possible to pass the token via an enviroment variable. The name of the variable have to be `tuttle_token_ + collection` (all dashes must be replaces by underscore). Example: `tuttle_token_tuttle_sample_data`

Be aware of the rate limits
* GitHub:
* 60 unauthenticated requests per hour
* 5,000 authenticated requests per hour


##### Create API-Keys for Github / Gitlab

At this stage of development, the API keys must be generated via the API endpoint '/git/apikey' or for a specific collection '/git/{collection}/apikey'.
Expand Down
Loading

0 comments on commit c58d664

Please sign in to comment.