Skip to content

Commit 551e9b6

Browse files
authored
Merge pull request #70 from virzak/master
Convert to TypeScript, upload attachments to S3, move code to src, update packages
2 parents 3b7d7d0 + 09edda0 commit 551e9b6

16 files changed

Lines changed: 1683 additions & 5297 deletions

.babelrc

Lines changed: 0 additions & 3 deletions
This file was deleted.

.gitignore

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,32 @@ build/Release
2626
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git
2727
node_modules
2828

29-
# ignore settings.js
29+
# ignore settings.js, settings.ts
3030
settings.js
31+
settings.ts
3132

3233
# ignore the log file
3334
merge-requests.json
3435

3536
# ignore the lock
3637
package-lock.json
3738

39+
40+
# Created by https://www.gitignore.io/api/visualstudiocode
41+
# Edit at https://www.gitignore.io/?templates=visualstudiocode
42+
43+
### VisualStudioCode ###
3844
.vscode/*
45+
!.vscode/settings.json
46+
!.vscode/tasks.json
47+
!.vscode/launch.json
48+
!.vscode/extensions.json
49+
50+
### VisualStudioCode Patch ###
51+
# Ignore all local history of files
52+
.history
53+
54+
# End of https://www.gitignore.io/api/visualstudiocode
3955

4056
# Created by https://www.gitignore.io/api/webstorm+iml
4157
# Edit at https://www.gitignore.io/?templates=webstorm+iml

.vscode/launch.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"type": "node",
9+
"request": "launch",
10+
"name": "Node: Launch",
11+
"env": { "TS_NODE_PROJECT": "tsconfig.dev.json" },
12+
"runtimeExecutable": "node",
13+
"args": [
14+
"--inspect",
15+
"-r",
16+
"ts-node/register/type-check",
17+
"-r",
18+
"tsconfig-paths/register",
19+
"src/index.ts"
20+
],
21+
"protocol": "inspector",
22+
"sourceMaps": true
23+
}
24+
]
25+
}

README.md

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,11 @@ After doing this, the autolinking of issues, commits, and branches will work. Se
3636

3737
The user must be a member of the project you want to copy or else you won't see it in the first step.
3838

39-
1. `cp sample_settings.js settings.js`
40-
1. edit settings.js
39+
1. `cp sample_settings.ts settings.ts`
40+
1. edit settings.ts
4141
1. run `npm run start`
4242

43-
## Where to find info for the `settings.js`
43+
## Where to find info for the `settings.ts`
4444

4545
### gitlab
4646

@@ -50,7 +50,7 @@ The URL under which your gitlab instance is hosted. Default is the official `htt
5050

5151
#### gitlab.token
5252

53-
Go to [Settings / Access Tokens](https://gitlab.com/profile/personal_access_tokens). Create a new Access Token with `api` and `read_repository` scopes and copy that into the `settings.js`
53+
Go to [Settings / Access Tokens](https://gitlab.com/profile/personal_access_tokens). Create a new Access Token with `api` and `read_repository` scopes and copy that into the `settings.ts`
5454

5555
#### gitlab.projectID
5656

@@ -68,15 +68,29 @@ Under which organisation or user will the new project be hosted
6868

6969
#### github.token
7070

71-
Go to [Settings / Developer settings / Personal access tokens](https://github.com/settings/tokens). Generate a new token with `repo` scope and copy that into the `settings.js`
71+
Go to [Settings / Developer settings / Personal access tokens](https://github.com/settings/tokens). Generate a new token with `repo` scope and copy that into the `settings.ts`
7272

7373
#### github.repo
7474

7575
What is the name of the new repo
7676

77+
### s3 (optional)
78+
79+
S3 can be used to store attachments from issues. If omitted, `has attachment` label will be added to GitHub issue.
80+
81+
#### s3.accessKeyId and s3.secretAccessKey
82+
83+
AWS [credentials](https://docs.aws.amazon.com/general/latest/gr/aws-sec-cred-types.html#access-keys-and-secret-access-keys) that are used to copy attachments from GitLab into the S3 bucket.
84+
85+
IAM User who owns these credential must have [write permissions](https://docs.aws.amazon.com/AmazonS3/latest/dev/example-policies-s3.html#iam-policy-ex0) to the bucket.
86+
87+
#### s3.bucket
88+
89+
Existing bucket, with an appropriate security policy. One possible policy is to allow [public access](https://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteAccessPermissionsReqd.html).
90+
7791
#### debug
7892

79-
As default it is set to false. Doesn't fire the requests to github api and only does the work on the gitlabb side to test for wonky cases before using up api-calls
93+
As default it is set to false. Doesn't fire the requests to github api and only does the work on the gitlab side to test for wonky cases before using up api-calls
8094

8195
#### usePlaceholderIssuesForMissingIssues
8296

gitlabHelper.js

Lines changed: 0 additions & 79 deletions
This file was deleted.

0 commit comments

Comments
 (0)