Skip to content

Commit ca873dd

Browse files
committed
Initial commit
0 parents  commit ca873dd

File tree

183 files changed

+18258
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

183 files changed

+18258
-0
lines changed

.devrev/repo.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
deployable: true

.env.example

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
TRELLO_API_KEY=
2+
TRELLO_TOKEN=
3+
TRELLO_ORGANIZATION_ID=
4+
5+
CHEF_CLI_PATH=

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- @radovanjorgic @patricijabrecko @devrev/airdrop

.gitignore

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
.DS_Store
2+
3+
chef-cli
4+
5+
# Ignore Node.js dependencies
6+
node_modules/
7+
8+
# Ignore intermediate build folders
9+
build.*/
10+
conformance_tests.backup/
11+
12+
# Ignore temporary folders used for runnning tests
13+
node_build/
14+
node_conformance_tests/
15+
16+
.venv
17+
18+
manual_testing/
19+
20+
.env

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# DevRev Trello Snap-In
2+
3+
## System requirements
4+
5+
- In the shell where you render, you need to have the following Python package installed:
6+
- `fastapi`
7+
- `uvicorn`
8+
- You should have repository https://github.com/devrev/airdrop-shared cloned inside the same directory as the snapin you are rendering.
9+
- `cp .env.example .env` and fill in the values for the environment variables.

build/babel.config.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
module.exports = {
2+
presets: [
3+
['@babel/preset-env', { targets: { node: 'current' } }],
4+
'@babel/preset-typescript',
5+
],
6+
};

build/jest.config.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
module.exports = {
2+
preset: 'ts-jest',
3+
testEnvironment: 'node',
4+
};

build/package.json

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
{
2+
"name": "devrev-snapin",
3+
"version": "1.1.6",
4+
"description": "DevRev ADaaS (Airdrop-as-a-service) Connector",
5+
"main": "./dist/index.js",
6+
"scripts": {
7+
"lint": "eslint .",
8+
"lint:fix": "eslint --fix -- .",
9+
"build": "rimraf ./dist && tsc",
10+
"build:watch": "tsc --watch",
11+
"prepackage": "npm run build",
12+
"package": "tar -cvzf build.tar.gz dist package.json package-lock.json .npmrc",
13+
"start": "ts-node ./src/main.ts",
14+
"start:production": "node dist/main.js",
15+
"test:server": "ts-node test/main.ts",
16+
"test": "jest",
17+
"test:watch": "jest --watch"
18+
},
19+
"keywords": [],
20+
"author": "",
21+
"license": "ISC",
22+
"devDependencies": {
23+
"@babel/core": "^7.26.10",
24+
"@babel/preset-env": "^7.20.2",
25+
"@babel/preset-typescript": "^7.18.6",
26+
"@types/body-parser": "^1.19.5",
27+
"@types/express": "^4.17.21",
28+
"@types/jest": "^29.4.0",
29+
"@types/node": "^18.13.0",
30+
"@types/yargs": "^17.0.24",
31+
"@typescript-eslint/eslint-plugin": "^8.32.0",
32+
"@typescript-eslint/parser": "^8.32.0",
33+
"babel-jest": "^29.4.2",
34+
"body-parser": "^1.20.3",
35+
"dotenv": "^16.0.3",
36+
"eslint": "^9.26.0",
37+
"eslint-config-prettier": "^9.0.0",
38+
"eslint-plugin-import": "^2.28.1",
39+
"eslint-plugin-prettier": "4.0.0",
40+
"eslint-plugin-simple-import-sort": "^10.0.0",
41+
"eslint-plugin-sort-keys-fix": "^1.1.2",
42+
"eslint-plugin-unused-imports": "^4.1.4",
43+
"express": "^4.21.0",
44+
"jest": "^29.4.2",
45+
"nodemon": "^3.0.3",
46+
"prettier": "^2.8.3",
47+
"prettier-plugin-organize-imports": "^3.2.2",
48+
"rimraf": "^4.1.2",
49+
"ts-jest": "^29.0.5",
50+
"ts-node": "^10.9.1",
51+
"typescript": "^4.9.5",
52+
"yargs": "^17.6.2"
53+
},
54+
"dependencies": {
55+
"@devrev/ts-adaas": "1.4.2",
56+
"axios": "^1.9.0",
57+
"dotenv": "^16.0.3",
58+
"js-jsonl": "^1.1.1",
59+
"yargs": "^17.6.2"
60+
}
61+
}
Lines changed: 181 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,181 @@
1+
{
2+
"additional_mappings": {
3+
"record_type_mappings": {
4+
"cards": {
5+
"default_mapping": {
6+
"object_type": "issue"
7+
},
8+
"possible_record_type_mappings": [
9+
{
10+
"devrev_leaf_type": "issue",
11+
"forward": true,
12+
"reverse": true,
13+
"shard": {
14+
"constructed_custom_fields": {
15+
"ext_object_type": {
16+
"field_descriptor": {
17+
"allowed_values": [
18+
"Card"
19+
],
20+
"db_name": "ext_object_type",
21+
"default_value": "Card",
22+
"description": "The source object type/subtype that the item was created from.",
23+
"field_type": "enum",
24+
"is_filterable": true,
25+
"is_required": true,
26+
"name": "ext_object_type",
27+
"oasis": {
28+
"name": "ext_object_type"
29+
},
30+
"ui": {
31+
"display_name": "External Object Type",
32+
"is_hidden_during_create": true,
33+
"is_read_only": true
34+
}
35+
},
36+
"transformation_method": {
37+
"can_apply_to_null": false,
38+
"custom_field_type": {
39+
"allowed_values": [
40+
"Card"
41+
],
42+
"db_name": "dummy name",
43+
"field_type": "enum",
44+
"name": "dummy name",
45+
"oasis": {
46+
"name": "dummy name"
47+
}
48+
},
49+
"forward_jq": "\"Card\"",
50+
"transformation_method": "use_raw_jq",
51+
"use_primary_input": false
52+
}
53+
}
54+
},
55+
"devrev_leaf_type": {
56+
"object_type": "issue"
57+
},
58+
"mode": "create_shard",
59+
"stock_field_mappings": {
60+
"applies_to_part_id": {
61+
"forward": true,
62+
"reverse": false,
63+
"transformation_method": {
64+
"is_array": false,
65+
"leaf_type": {
66+
"object_type": "product"
67+
},
68+
"transformation_method": "use_devrev_record"
69+
}
70+
},
71+
"created_by_id": {
72+
"forward": true,
73+
"primary_external_field": "assignee",
74+
"reverse": false,
75+
"transformation_method": {
76+
"transformation_method": "use_directly"
77+
}
78+
},
79+
"owned_by_ids": {
80+
"forward": true,
81+
"primary_external_field": "assignee",
82+
"reverse": true,
83+
"transformation_method": {
84+
"transformation_method": "use_as_array_value"
85+
}
86+
},
87+
"priority": {
88+
"forward": true,
89+
"reverse": false,
90+
"transformation_method": {
91+
"enum": "P0",
92+
"transformation_method": "use_fixed_value",
93+
"value": "enum_value"
94+
}
95+
},
96+
"stage": {
97+
"forward": true,
98+
"reverse": false,
99+
"transformation_method": {
100+
"enum": "backlog",
101+
"transformation_method": "use_fixed_value",
102+
"value": "enum_value"
103+
}
104+
},
105+
"title": {
106+
"forward": true,
107+
"primary_external_field": "name",
108+
"reverse": true,
109+
"transformation_method": {
110+
"transformation_method": "use_directly"
111+
}
112+
},
113+
"item_url_field": {
114+
"forward": true,
115+
"primary_external_field": "item_url_field",
116+
"reverse": false,
117+
"transformation_method": {
118+
"transformation_method": "use_directly"
119+
}
120+
},
121+
"body": {
122+
"forward": true,
123+
"primary_external_field": "description",
124+
"reverse": true,
125+
"transformation_method": {
126+
"transformation_method": "use_rich_text"
127+
}
128+
}
129+
}
130+
}
131+
}
132+
]
133+
},
134+
"users": {
135+
"default_mapping": {
136+
"object_type": "devu"
137+
},
138+
"possible_record_type_mappings": [
139+
{
140+
"devrev_leaf_type": "devu",
141+
"forward": true,
142+
"reverse": false,
143+
"shard": {
144+
"constructed_custom_fields": {},
145+
"devrev_leaf_type": {
146+
"object_type": "devu"
147+
},
148+
"mode": "create_shard",
149+
"stock_field_mappings": {
150+
"display_name": {
151+
"forward": true,
152+
"primary_external_field": "name",
153+
"reverse": false,
154+
"transformation_method": {
155+
"transformation_method": "use_directly"
156+
}
157+
},
158+
"email": {
159+
"forward": true,
160+
"primary_external_field": "email",
161+
"reverse": false,
162+
"transformation_method": {
163+
"transformation_method": "use_directly"
164+
}
165+
},
166+
"full_name": {
167+
"forward": true,
168+
"primary_external_field": "name",
169+
"reverse": false,
170+
"transformation_method": {
171+
"transformation_method": "use_directly"
172+
}
173+
}
174+
}
175+
}
176+
}
177+
]
178+
}
179+
}
180+
}
181+
}

0 commit comments

Comments
 (0)