Skip to content

Commit c58d664

Browse files
authored
Version 1.2
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
1 parent 232afc3 commit c58d664

File tree

15 files changed

+24339
-33
lines changed

15 files changed

+24339
-33
lines changed

.github/workflows/node.js.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
3+
4+
name: Test
5+
6+
on: [push, pull_request]
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
strategy:
12+
matrix:
13+
exist-version: [latest, release, 5.3.0]
14+
services:
15+
# Label used to access the service container
16+
exist:
17+
env:
18+
tuttle_token_tuttle_sample_data: ${{ secrets.tuttle_token_tuttle_sample_data }}
19+
image: existdb/existdb:${{ matrix.exist-version }}
20+
ports:
21+
- 8443:8443
22+
steps:
23+
- uses: actions/checkout@v2
24+
- name: Use Node.js 14
25+
uses: actions/setup-node@v1
26+
with:
27+
node-version: 14
28+
- run: npm ci
29+
- name: run tests
30+
run: npm test
31+

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
/.idea/
2-
package-lock.json
32
/build
43
node_modules
54
.vscode

README.md

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ Synchronizes your data collection with GitHub and GitLab.
1010
## Functionality
1111

1212
* Sync data collection from Git to DB
13-
* Deal with Multi repository
13+
* Deal with multiple repositories
1414
* Incremental updates
15+
* Works with private or public repositories
1516

1617
## Requirements
1718

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

2222
## Building and Installation
2323

@@ -56,7 +56,7 @@ An example:
5656
<baseurl>https://api.github.com/</baseurl>
5757
<repo>tuttle-sample-data</repo>
5858
<owner>tuttle-sample-data</owner>
59-
<token>XXX</token>
59+
<token></token>
6060
<ref>master</ref>
6161
<hookuser>admin</hookuser>
6262
<hookpasswd></hookpasswd>
@@ -90,6 +90,18 @@ Define the working branch of the git repository
9090

9191
#### hookuser & hookpasswd
9292

93+
#### token
94+
95+
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.
96+
97+
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`
98+
99+
Be aware of the rate limits
100+
* GitHub:
101+
* 60 unauthenticated requests per hour
102+
* 5,000 authenticated requests per hour
103+
104+
93105
##### Create API-Keys for Github / Gitlab
94106

95107
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'.

0 commit comments

Comments
 (0)