@itentialopensource/adapter-gitlab 0.9.0 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/AUTH.md +10 -16
  2. package/CALLS.md +3317 -22
  3. package/CHANGELOG.md +8 -0
  4. package/CONTRIBUTING.md +1 -160
  5. package/ENHANCE.md +2 -2
  6. package/README.md +32 -23
  7. package/SYSTEMINFO.md +10 -3
  8. package/adapter.js +162 -333
  9. package/adapterBase.js +549 -879
  10. package/changelogs/changelog.md +150 -0
  11. package/metadata.json +144 -0
  12. package/package.json +25 -25
  13. package/pronghorn.json +974 -635
  14. package/propertiesSchema.json +422 -31
  15. package/refs?service=git-upload-pack +0 -0
  16. package/report/adapter-openapi.json +22114 -0
  17. package/report/adapter-openapi.yaml +17482 -0
  18. package/report/adapterInfo.json +8 -8
  19. package/report/updateReport1691507765982.json +120 -0
  20. package/report/updateReport1692202758222.json +120 -0
  21. package/report/updateReport1694455459957.json +120 -0
  22. package/report/updateReport1694457800479.json +120 -0
  23. package/report/updateReport1694463250037.json +120 -0
  24. package/sampleProperties.json +63 -2
  25. package/test/integration/adapterTestBasicGet.js +2 -4
  26. package/test/integration/adapterTestConnectivity.js +91 -42
  27. package/test/integration/adapterTestIntegration.js +130 -2
  28. package/test/unit/adapterBaseTestUnit.js +388 -313
  29. package/test/unit/adapterTestUnit.js +338 -112
  30. package/utils/adapterInfo.js +1 -1
  31. package/utils/addAuth.js +1 -1
  32. package/utils/artifactize.js +1 -1
  33. package/utils/checkMigrate.js +1 -1
  34. package/utils/entitiesToDB.js +2 -2
  35. package/utils/findPath.js +1 -1
  36. package/utils/methodDocumentor.js +260 -0
  37. package/utils/modify.js +13 -15
  38. package/utils/packModificationScript.js +1 -1
  39. package/utils/pre-commit.sh +2 -0
  40. package/utils/taskMover.js +309 -0
  41. package/utils/tbScript.js +89 -34
  42. package/utils/tbUtils.js +41 -21
  43. package/utils/testRunner.js +1 -1
  44. package/utils/troubleshootingAdapter.js +9 -6
  45. package/workflows/Gitlab WF.json +0 -1
  46. package/workflows/README.md +0 -3
@@ -0,0 +1,150 @@
1
+
2
+ ## 0.9.0 [05-30-2023]
3
+
4
+ * Minor/adapt 2433
5
+
6
+ See merge request itentialopensource/adapters/devops-netops/adapter-gitlab!16
7
+
8
+ ---
9
+
10
+ ## 0.8.1 [02-02-2023]
11
+
12
+ * Added option to task and updated adapter-utils version to fix security issues
13
+
14
+ See merge request itentialopensource/adapters/devops-netops/adapter-gitlab!15
15
+
16
+ ---
17
+
18
+ ## 0.8.0 [05-19-2022]
19
+
20
+ * Migration to the latest Adapter Foundation
21
+
22
+ See merge request itentialopensource/adapters/devops-netops/adapter-gitlab!13
23
+
24
+ ---
25
+
26
+ ## 0.7.4 [07-19-2021]
27
+
28
+ - Fix broadcast message endpoint
29
+
30
+ See merge request itentialopensource/adapters/devops-netops/adapter-gitlab!12
31
+
32
+ ---
33
+
34
+ ## 0.7.3 [07-06-2021]
35
+
36
+ - If IAP version >= 2020, then exclude mongoProps, redis, and rabbitmqProps.
37
+
38
+ See merge request itentialopensource/adapters/devops-netops/adapter-gitlab!11
39
+
40
+ ---
41
+
42
+ ## 0.7.2 [07-06-2021]
43
+
44
+ - Updated README.md for ADAPT-733
45
+
46
+ See merge request itentialopensource/adapters/devops-netops/adapter-gitlab!10
47
+
48
+ ---
49
+
50
+ ## 0.7.1 [04-05-2021]
51
+
52
+ - Add per page parameter to getV4ProjectsIdRepositoryTree - this will break this call if it exists in workflows since it changes the method signature
53
+
54
+ See merge request itentialopensource/adapters/devops-netops/adapter-gitlab!9
55
+
56
+ ---
57
+
58
+ ## 0.7.0 [03-31-2021]
59
+
60
+ - Add 2 new calls required for prebuilt
61
+
62
+ See merge request itentialopensource/adapters/devops-netops/adapter-gitlab!8
63
+
64
+ ---
65
+
66
+ ## 0.6.4 [03-07-2021]
67
+
68
+ - Migration to bring up to the latest foundation
69
+ - Change to .eslintignore (adapter_modification directory)
70
+ - Change to README.md (new properties, new scripts, new processes)
71
+ - Changes to adapterBase.js (new methods)
72
+ - Changes to package.json (new scripts, dependencies)
73
+ - Changes to propertiesSchema.json (new properties and changes to existing)
74
+ - Changes to the Unit test
75
+ - Adding several test files, utils files and .generic entity
76
+ - Fix order of scripts and dependencies in package.json
77
+ - Fix order of properties in propertiesSchema.json
78
+ - Update sampleProperties, unit and integration tests to have all new properties.
79
+ - Add all new calls to adapter.js and pronghorn.json
80
+ - Add suspend piece to older methods
81
+
82
+ See merge request itentialopensource/adapters/devops-netops/adapter-gitlab!7
83
+
84
+ ---
85
+
86
+ ## 0.6.3 [07-08-2020]
87
+
88
+ - Update to the latest adapter foundation
89
+
90
+ See merge request itentialopensource/adapters/devops-netops/adapter-gitlab!6
91
+
92
+ ---
93
+
94
+ ## 0.6.2 [01-29-2020]
95
+
96
+ - Update this in the schema file, there are probably more changes like this needed but would need to know everything that we wanted to change before changing them.
97
+
98
+ See merge request itentialopensource/adapters/devops-netops/adapter-gitlab!5
99
+
100
+ ---
101
+
102
+ ## 0.6.1 [01-09-2020]
103
+
104
+ - Update the adapter to the latest foundation
105
+
106
+ See merge request itentialopensource/adapters/devops-netops/adapter-gitlab!4
107
+
108
+ ---
109
+
110
+ ## 0.6.0 [11-07-2019]
111
+
112
+ - Update the adapter to the latest adapter foundation.
113
+ - Updating to adapter-utils 4.24.3 (automatic)
114
+ - Add sample token schemas (manual)
115
+ - Adding placement property to getToken response schema (manual - before encrypt)
116
+ - Adding sso default into action.json for getToken (manual - before response object)
117
+ - Add new adapter properties for metrics & mock (save_metric, mongo and return_raw) (automatic - check place manual before stub)
118
+ - Update sample properties to include new properties (manual)
119
+ - Update integration test for raw mockdata (automatic)
120
+ - Update test properties (manual)
121
+ - Changes to artifactize (automatic)
122
+ - Update type in sampleProperties so it is correct for the adapter (manual)
123
+ - Update the readme (automatic)
124
+
125
+ See merge request itentialopensource/adapters/devops-netops/adapter-gitlab!3
126
+
127
+ ---
128
+
129
+ ## 0.5.0 [09-17-2019]
130
+
131
+ - Update the adapter to the latest adapter foundation
132
+
133
+ See merge request itentialopensource/adapters/devops-netops/adapter-gitlab!2
134
+
135
+ ---
136
+ ## 0.4.0 [07-30-2019] & 0.3.0 [07-18-2019]
137
+
138
+ - Migrate to the latest adapter foundation, categorization and prepare for app artifact
139
+
140
+ See merge request itentialopensource/adapters/devops-netops/adapter-gitlab!1
141
+
142
+ ---
143
+
144
+ ## 0.2.1 [07-08-2019] & 0.1.1 [06-17-2019]
145
+
146
+ - Initial Commits
147
+
148
+ See commit 0a4424e
149
+
150
+ ---
package/metadata.json ADDED
@@ -0,0 +1,144 @@
1
+ {
2
+ "name": "adapter-gitlab",
3
+ "webName": "Adapter for Integration to GitLab",
4
+ "vendor": "GitLab",
5
+ "product": "GitLab",
6
+ "osVersion": [],
7
+ "apiVersions": [
8
+ "4"
9
+ ],
10
+ "iapVersions": [
11
+ "2021.1.x",
12
+ "2021.2.x",
13
+ "2022.1.x",
14
+ "2023.1.x"
15
+ ],
16
+ "method": "REST",
17
+ "type": "Adapter",
18
+ "domains": [
19
+ "CI/CD"
20
+ ],
21
+ "tags": [
22
+ "Pipeline"
23
+ ],
24
+ "useCases": [
25
+ "Automate Start of CI/CD Process",
26
+ "Create, update, manage and remove Projects",
27
+ "Automated Deployment of a new System, Application or Project"
28
+ ],
29
+ "deprecated": {
30
+ "isDeprecated": false
31
+ },
32
+ "brokerSince": "",
33
+ "documentation": {
34
+ "storeLink": "",
35
+ "npmLink": "https://www.npmjs.com/package/@itentialopensource/adapter-gitlab",
36
+ "repoLink": "https://gitlab.com/itentialopensource/adapters/devops-netops/adapter-gitlab.git",
37
+ "docLink": "https://docs.itential.com/opensource/docs/gitlab",
38
+ "demoLinks": [],
39
+ "faqLink": "https://docs.itential.com/opensource/docs/troubleshooting-an-adapter",
40
+ "contributeLink": "https://gitlab.com/itentialopensource/adapters/contributing-guide",
41
+ "issueLink": "https://itential.atlassian.net/servicedesk/customer/portals",
42
+ "webLink": "https://www.itential.com/adapters/7846/",
43
+ "vendorLink": "https://about.gitlab.com/",
44
+ "productLink": "https://about.gitlab.com/",
45
+ "apiLinks": [
46
+ "https://docs.gitlab.com/ee/api/rest/",
47
+ "https://docs.gitlab.com/ee/api/api_resources.html"
48
+ ]
49
+ },
50
+ "assets": [],
51
+ "relatedItems": {
52
+ "adapters": [],
53
+ "integrations": [],
54
+ "ecosystemApplications": [],
55
+ "workflowProjects": [
56
+ {
57
+ "name": "Prebuilt Promotion",
58
+ "webName": "Pre-Built Promotion",
59
+ "overview": "Prebuilt Promotion takes a pre-built installed on IAP in Admin Essentials and creates a new project or updates an existing project by way of a merge request or pull request in the specified version control platform (i.e. GitLab, Github, Bitbucket) using the pre-built's IAP components and other files for CI/CD of maintaining those resources.",
60
+ "isDependency": false,
61
+ "versions": [
62
+ "^1.0.4"
63
+ ],
64
+ "repoLink": "https://gitlab.com/itentialopensource/pre-built-automations/prebuilt-promotion",
65
+ "docLink": "",
66
+ "webLink": "https://www.itential.com/automations/prebuilt-promotion/"
67
+ },
68
+ {
69
+ "name": "Automation Gateway Copy Files From Git",
70
+ "webName": "Copy Script from GitLab or GitHub into Automation Gateway",
71
+ "overview": "This Pre-Built Automation enables users to copy a file from a Gitlab or GitHub repository to an IAG server.",
72
+ "isDependency": false,
73
+ "versions": [
74
+ "^1.0.5"
75
+ ],
76
+ "repoLink": "https://gitlab.com/itentialopensource/pre-built-automations/automation-gateway-copy-files-from-git",
77
+ "docLink": "",
78
+ "webLink": "https://www.itential.com/automations/automation-gateway-copy-files-from-git/"
79
+ },
80
+ {
81
+ "name": "Push Bundles To Gitlab Using Adapter",
82
+ "webName": "Push Bundles To Gitlab Using Adapter",
83
+ "overview": "Ability to push a Pre-Builts into a GitLab repository using the GitLab Adapter",
84
+ "isDependency": false,
85
+ "versions": [
86
+ "^0.0.11"
87
+ ],
88
+ "repoLink": "https://gitlab.com/itentialopensource/pre-built-automations/push-bundles-to-gitlab-using-adapter",
89
+ "docLink": "",
90
+ "webLink": ""
91
+ },
92
+ {
93
+ "name": "Create Gitlab Branch",
94
+ "webName": "Create GitLab Branch",
95
+ "overview": "The Create GitLab Branch pre-built consists of an Operations Manager automation which can be used to create a branch in a GitLab project if it doesn't already exists.",
96
+ "isDependency": false,
97
+ "versions": [
98
+ "^1.0.2"
99
+ ],
100
+ "repoLink": "https://gitlab.com/itentialopensource/pre-built-automations/create-gitlab-branch",
101
+ "docLink": "",
102
+ "webLink": "https://www.itential.com/automations/create-gitlab-branch/"
103
+ },
104
+ {
105
+ "name": "Create Gitlab Project",
106
+ "webName": "Create GitLab Project",
107
+ "overview": "The Create GitLab Project pre-built consists of an Operations Manager automation which can be used to create a project in GitLab if it doesn't already exists, with or without using a custom template.",
108
+ "isDependency": false,
109
+ "versions": [
110
+ "^1.0.1"
111
+ ],
112
+ "repoLink": "https://gitlab.com/itentialopensource/pre-built-automations/create-gitlab-project",
113
+ "docLink": "",
114
+ "webLink": "https://www.itential.com/automations/create-gitlab-project/"
115
+ },
116
+ {
117
+ "name": "Gitlab Pull a File from Repo",
118
+ "webName": "GitLab Pull a File from Repo",
119
+ "overview": "The Gitlab Pull A File from Repository pre-built consists of an Operations Manager automation which can be used to read an existing file from a specific gitlab project.",
120
+ "isDependency": false,
121
+ "versions": [
122
+ "^0.0.5"
123
+ ],
124
+ "repoLink": "https://gitlab.com/itentialopensource/pre-built-automations/gitlab-pull-a-file-from-repo",
125
+ "docLink": "",
126
+ "webLink": "https://www.itential.com/automations/gitlab-pull-a-file-from-repo/"
127
+ },
128
+ {
129
+ "name": "Gitlab Get Diff of Merge",
130
+ "webName": "GitLab Get Diff of Merge",
131
+ "overview": "The Gitlab Get Diff of Merge pre-built consists of an Operations Manager automation which can be used to get the diff (difference) between the current state and the proposed changes of your gitlab project branch.",
132
+ "isDependency": false,
133
+ "versions": [
134
+ "^0.0.6"
135
+ ],
136
+ "repoLink": "https://gitlab.com/itentialopensource/pre-built-automations/gitlab-get-diff-of-merge",
137
+ "docLink": "",
138
+ "webLink": "https://www.itential.com/automations/gitlab-get-diff-of-merge/"
139
+ }
140
+ ],
141
+ "transformationProjects": [],
142
+ "exampleProjects": []
143
+ }
144
+ }
package/package.json CHANGED
@@ -1,15 +1,16 @@
1
1
  {
2
2
  "name": "@itentialopensource/adapter-gitlab",
3
- "version": "0.9.0",
3
+ "version": "0.10.0",
4
4
  "description": "This adapter integrates with system described as: gitlab.",
5
5
  "main": "adapter.js",
6
- "systemName": "GitLab",
6
+ "systemName": "Gitlab",
7
7
  "wizardVersion": "2.44.7",
8
- "engineVersion": "1.61.6",
8
+ "engineVersion": "1.67.8",
9
9
  "adapterType": "http",
10
10
  "scripts": {
11
11
  "artifactize": "npm i && node utils/packModificationScript.js",
12
- "preinstall": "node utils/setup.js && npm install --package-lock-only --ignore-scripts && npx npm-force-resolutions",
12
+ "preinstall": "node utils/setup.js",
13
+ "deinstall": "node utils/removeHooks.js",
13
14
  "lint": "node --max_old_space_size=4096 ./node_modules/eslint/bin/eslint.js . --ext .json --ext .js",
14
15
  "lint:errors": "node --max_old_space_size=4096 ./node_modules/eslint/bin/eslint.js . --ext .json --ext .js --quiet",
15
16
  "test:baseunit": "mocha test/unit/adapterBaseTestUnit.js --LOG=error",
@@ -23,7 +24,7 @@
23
24
  "adapter:migrate": "node utils/modify.js -m",
24
25
  "adapter:update": "node utils/modify.js -u",
25
26
  "adapter:revert": "node utils/modify.js -r",
26
- "troubleshoot": "node utils/tbScript.js",
27
+ "troubleshoot": "node utils/tbScript.js troubleshoot",
27
28
  "healthcheck": "node utils/tbScript.js healthcheck",
28
29
  "basicget": "node utils/tbScript.js basicget",
29
30
  "connectivity": "node utils/tbScript.js connectivity",
@@ -54,32 +55,31 @@
54
55
  "author": "Itential",
55
56
  "homepage": "https://gitlab.com/itentialopensource/adapters/devops-netops/adapter-gitlab#readme",
56
57
  "dependencies": {
57
- "@itentialopensource/adapter-utils": "^4.48.6",
58
- "ajv": "^6.12.0",
59
- "axios": "^0.21.0",
60
- "commander": "^2.20.0",
61
- "fs-extra": "^8.1.0",
58
+ "@itentialopensource/adapter-utils": "^5.1.7",
59
+ "acorn": "^8.10.0",
60
+ "ajv": "^8.12.0",
61
+ "axios": "^1.4.0",
62
+ "commander": "^11.0.0",
63
+ "dns-lookup-promise": "^1.0.4",
64
+ "fs-extra": "^11.1.1",
62
65
  "json-query": "^2.2.2",
63
- "mocha": "^9.0.1",
66
+ "mocha": "^10.2.0",
64
67
  "mocha-param": "^2.0.1",
65
- "mongodb": "^4.1.0",
66
- "network-diagnostics": "^0.5.3",
68
+ "mongodb": "^4.16.0",
67
69
  "nyc": "^15.1.0",
70
+ "ping": "^0.4.4",
71
+ "prompts": "^2.4.2",
68
72
  "readline-sync": "^1.4.10",
69
- "semver": "^7.3.2",
70
- "winston": "^3.3.3"
73
+ "semver": "^7.5.3",
74
+ "winston": "^3.9.0"
71
75
  },
72
76
  "devDependencies": {
73
- "chai": "^4.3.4",
74
- "eslint": "^7.29.0",
75
- "eslint-config-airbnb-base": "^14.2.1",
76
- "eslint-plugin-import": "^2.23.4",
77
- "eslint-plugin-json": "^3.0.0",
78
- "package-json-validator": "^0.6.3",
79
- "testdouble": "^3.16.1"
80
- },
81
- "resolutions": {
82
- "minimist": "^1.2.5"
77
+ "chai": "^4.3.7",
78
+ "eslint": "^8.44.0",
79
+ "eslint-config-airbnb-base": "^15.0.0",
80
+ "eslint-plugin-import": "^2.27.5",
81
+ "eslint-plugin-json": "^3.1.0",
82
+ "testdouble": "^3.18.0"
83
83
  },
84
84
  "private": false
85
85
  }