neetob-ud 0.2.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (70) hide show
  1. checksums.yaml +7 -0
  2. data/.editorconfig +10 -0
  3. data/.env +1 -0
  4. data/.rubocop.yml +596 -0
  5. data/.ruby-version +1 -0
  6. data/.semaphore/semaphore.yml +30 -0
  7. data/CHANGELOG.md +40 -0
  8. data/CODE_OF_CONDUCT.md +84 -0
  9. data/Gemfile +28 -0
  10. data/Gemfile.lock +250 -0
  11. data/LICENSE.txt +21 -0
  12. data/README.md +396 -0
  13. data/Rakefile +16 -0
  14. data/config/secrets.yml +0 -0
  15. data/data/branch-protection-rules.json +25 -0
  16. data/data/config-vars-audit.json +18 -0
  17. data/data/config-vars-list.json +1 -0
  18. data/data/github-labels.json +197 -0
  19. data/env.sample +1 -0
  20. data/exe/neetob +25 -0
  21. data/install.sh +21 -0
  22. data/lib/neetob/cli/base.rb +96 -0
  23. data/lib/neetob/cli/fetchorupdate_repos/execute.rb +55 -0
  24. data/lib/neetob/cli/github/auth.rb +134 -0
  25. data/lib/neetob/cli/github/base.rb +42 -0
  26. data/lib/neetob/cli/github/commands.rb +54 -0
  27. data/lib/neetob/cli/github/issues/commands.rb +51 -0
  28. data/lib/neetob/cli/github/issues/create.rb +42 -0
  29. data/lib/neetob/cli/github/issues/list.rb +94 -0
  30. data/lib/neetob/cli/github/labels/commands.rb +65 -0
  31. data/lib/neetob/cli/github/labels/delete.rb +46 -0
  32. data/lib/neetob/cli/github/labels/delete_all.rb +50 -0
  33. data/lib/neetob/cli/github/labels/list.rb +38 -0
  34. data/lib/neetob/cli/github/labels/show.rb +39 -0
  35. data/lib/neetob/cli/github/labels/update.rb +42 -0
  36. data/lib/neetob/cli/github/labels/upsert.rb +64 -0
  37. data/lib/neetob/cli/github/login.rb +16 -0
  38. data/lib/neetob/cli/github/make_pr/base.rb +72 -0
  39. data/lib/neetob/cli/github/make_pr/commands.rb +37 -0
  40. data/lib/neetob/cli/github/make_pr/compliance_fix.rb +49 -0
  41. data/lib/neetob/cli/github/make_pr/script.rb +55 -0
  42. data/lib/neetob/cli/github/protect_branch.rb +48 -0
  43. data/lib/neetob/cli/github/search.rb +38 -0
  44. data/lib/neetob/cli/heroku/access/add.rb +38 -0
  45. data/lib/neetob/cli/heroku/access/commands.rb +41 -0
  46. data/lib/neetob/cli/heroku/access/list.rb +36 -0
  47. data/lib/neetob/cli/heroku/access/remove.rb +38 -0
  48. data/lib/neetob/cli/heroku/commands.rb +28 -0
  49. data/lib/neetob/cli/heroku/config_vars/audit.rb +64 -0
  50. data/lib/neetob/cli/heroku/config_vars/base.rb +19 -0
  51. data/lib/neetob/cli/heroku/config_vars/commands.rb +49 -0
  52. data/lib/neetob/cli/heroku/config_vars/list.rb +56 -0
  53. data/lib/neetob/cli/heroku/config_vars/remove.rb +39 -0
  54. data/lib/neetob/cli/heroku/config_vars/upsert.rb +80 -0
  55. data/lib/neetob/cli/heroku/execute.rb +37 -0
  56. data/lib/neetob/cli/local/commands.rb +19 -0
  57. data/lib/neetob/cli/local/ls.rb +29 -0
  58. data/lib/neetob/cli/sub_command_base.rb +17 -0
  59. data/lib/neetob/cli/ui.rb +41 -0
  60. data/lib/neetob/cli/users/audit.rb +121 -0
  61. data/lib/neetob/cli/users/commands.rb +30 -0
  62. data/lib/neetob/cli/users/commits.rb +171 -0
  63. data/lib/neetob/cli.rb +42 -0
  64. data/lib/neetob/exception_handler.rb +58 -0
  65. data/lib/neetob/utils.rb +16 -0
  66. data/lib/neetob/version.rb +5 -0
  67. data/lib/neetob.rb +10 -0
  68. data/overcommit.yml +43 -0
  69. data/scripts/delete_unused_assets.rb +67 -0
  70. metadata +186 -0
data/README.md ADDED
@@ -0,0 +1,396 @@
1
+ # neetob
2
+
3
+ The `neetob` gem gives different commands for interacting with Github and Heroku instances of existing neeto projects.
4
+
5
+ ## Table of Contents
6
+
7
+ 1. [Getting Started](#getting-started)
8
+ 1. [Installation](#installation)
9
+ 2. [Usage](#usage)
10
+ 3. [Working with GitHub](#working-with-github)
11
+ 1. [Issues](#issues)
12
+ 2. [Labels](#labels)
13
+ 3. [Search](#search)
14
+ 4. [Protect Branch](#protect-branch)
15
+ 5. [Make PR](#make-pr)
16
+ 6. [Login](#login)
17
+ 4. [Working with Heroku](#working-with-heroku)
18
+ 1. [Config Vars](#config-vars)
19
+ 2. [Access](#access)
20
+ 3. [Execute](#execute)
21
+ 5. [Working with Users](#working-with-users)
22
+ 1. [Audit](#audit)
23
+ 2. [Commits](#commits)
24
+ 6. [Working with Make Repos Uptodate](#working-with-make-repos-uptodate)
25
+ 7. [Working with local Repos](#working-with-local-repos)
26
+ 1. [ls](#ls)
27
+ 8. [Testing](#testing)
28
+
29
+ ## Getting started
30
+
31
+ ### Installation
32
+
33
+ Clone the repository onto your system using the following command:
34
+
35
+ ```sh
36
+ git clone https://github.com/bigbinary/neetob.git
37
+ ```
38
+
39
+ Navigate to the root of the application directory.
40
+
41
+ ```sh
42
+ cd neetob
43
+ ```
44
+
45
+ To set up `neetob`, execute the below command from the root of the application directory.
46
+
47
+ ```sh
48
+ bin/setup
49
+ ```
50
+
51
+ ## Usage
52
+
53
+ Utilize the `help` keyword to access a comprehensive list of all the available commands and options.
54
+
55
+ ```
56
+ neetob help
57
+
58
+ Commands:
59
+ neetob github # Interact with any resource in Github
60
+ neetob help [COMMAND] # Describe available commands or one specific command
61
+ neetob heroku # Interact with any resource in Heroku
62
+ neetob users # Interact with the contributors of neeto apps
63
+ neetob make-repos-uptodate # Update all neeto repos
64
+
65
+ Options:
66
+ [--sandbox] # All the commands in sandbox mode will run only on the "neeto-dummy" app.
67
+ ```
68
+
69
+ **By default, all commands will be executed in non-sandbox mode.**
70
+
71
+ ### Useful command-line options
72
+
73
+ | Option | Meaning |
74
+ | ------------ | --------------------------------- |
75
+ | --apps | Target app names |
76
+ | --sandbox | Sandbox mode |
77
+ | --no-sandbox | Non-Sandbox mode |
78
+ | --help | Provides information on a command |
79
+
80
+ **Note:** The commands within `neetob` should be used with caution, as improper usage may result in unintended consequences, and some actions may not be reversible.
81
+
82
+ ## Working with GitHub
83
+
84
+ Efficiently gain access to a comprehensive list of all the available subcommands for the `github` command by utilizing the `help` keyword.
85
+
86
+ ```sh
87
+ neetob github help
88
+ ```
89
+
90
+ ### Issues
91
+
92
+ The `issues` command offers valuable insights into GitHub issues.
93
+
94
+ ```sh
95
+ # To efficiently list and count all the open issues that are currently unassigned
96
+ neetob github issues list --count --state open --assignee none --apps "neeto-*-web"
97
+
98
+ # To list, count and filter all unassigned open issues that are labeled as "bug"
99
+ neetob github issues list --count --label bug --state open --assignee none --apps "neeto-*-web"
100
+ ```
101
+
102
+ ### Labels
103
+
104
+ The `labels` command provides an interface for interacting with Github labels.
105
+
106
+ ```sh
107
+ # The `list` command lists the details of all the labels in the Github repo
108
+ neetob github labels list --apps "neeto-*-web"
109
+
110
+ # The `show` command gives the details for a specific label in the Github repo
111
+ neetob github labels show --name priority --apps "neeto-*-web"
112
+
113
+ # The `update` command updates the name of a label
114
+ neetob github labels update --old-name "High Priority" --new-name \
115
+ "high-priority" --all-neeto-repos
116
+
117
+ # The `upsert` command updates and inserts all the labels mentioned in the
118
+ # JSON file "data/github-labels.json"
119
+ neetob github labels upsert --all-neeto-repos
120
+
121
+ # The `upsert` command accepts a different JSON file using `path` option
122
+ neetob github labels upsert --path ~/Desktop/labels.json --apps "neeto-*-web"
123
+
124
+ # The `delete` command deletes the given labels from the Github repos
125
+ neetob github labels delete --labels "High Priority" "Priority 1" "bug" \
126
+ --apps "neeto-*-web"
127
+
128
+ # The `delete_all` command deletes all the labels from the Github repos
129
+ neetob github labels delete_all --apps "neeto-*-web"
130
+ ```
131
+
132
+ Check out the default labels [file](data/github-labels.json) for the required JSON file structure.
133
+
134
+ All neeto repos list is maintained at [neeto_compliance](https://github.com/bigbinary/neeto-compliance/blob/main/data/neeto_repos.json).
135
+
136
+ ### Search
137
+
138
+ Easily search for keywords across multiple neeto projects within specified files by utilizing the `search` command.
139
+
140
+ ```sh
141
+ neetob github search --keyword neeto --path README.md --apps "neeto-*-web"
142
+ ```
143
+
144
+ ### Protect branch
145
+
146
+ Update branch protection rules in neeto repos by using the `protect_branch` command.
147
+
148
+ ```sh
149
+ neetob github protect_branch --branch main --apps neeto-dummy
150
+ ```
151
+
152
+ By default, this [file](data/branch-protection-rules.json) will be used for updating the branch protection rules.
153
+
154
+ The `protect_branch` command can also be used with a different JSON file using `path` option.
155
+
156
+ For example, assume we have a file named `branch-protection-rules.json` on the `Desktop` with the following rules:
157
+
158
+ ```json
159
+ {
160
+ "required_conversation_resolution": true,
161
+ "has_required_deployments": true
162
+ }
163
+ ```
164
+
165
+ To update the above-mentioned branch protection rules for the `main` branch of all the neeto products, use the following command:
166
+
167
+ ```sh
168
+ neetob github protect_branch --branch main --path ~/Desktop/branch-protection-rules.json \
169
+ --apps neeto-dummy
170
+ ```
171
+
172
+ We can also use the `--all-neeto-repos` option with the above mentioned command so that the
173
+ branch protection rules can be updated for
174
+ all [neeto repos](https://github.com/bigbinary/neeto-compliance/blob/main/data/neeto_repos.json).
175
+
176
+ ```sh
177
+ neetob github protect_branch --branch main --path ~/Desktop/branch-protection-rules.json \
178
+ --all-neeto-repos
179
+ ```
180
+
181
+ **Note:** Unfortunately, utilizing the Github API, we are unable to update the `Require deployments to succeed before merging` rule, as it is currently not defined as a parameter within the API. For further information on available options to update different branch protection rules, kindly refer to the official Github [documentation](https://docs.github.com/en/rest/branches/branch-protection#update-branch-protection).
182
+
183
+ ### Make PR
184
+
185
+ The `make-pr` command creates pull requests across Github repos.
186
+
187
+ ```sh
188
+ # The `compliance-fix` command executes a `bundle` inside all repos and creates a PR
189
+ neetob github make-pr compliance-fix
190
+
191
+ # The `script` command runs the given script for each product and create a PR
192
+ neetob github make-pr script --path ~/Desktop/fix-folders.sh --branch "neetob-test" \
193
+ --title "PR title"
194
+ ```
195
+
196
+ ### Login
197
+
198
+ Authenticate through your browser and update your Github access token by utilizing the `login` command.
199
+
200
+ ```sh
201
+ neetob github login
202
+ ```
203
+
204
+ ## Working with Heroku
205
+
206
+ Utilize the `help` command to list all the available subcommands under the Heroku module for interacting with the Heroku resources.
207
+
208
+ ```sh
209
+ neetob heroku help
210
+ ```
211
+
212
+ ### Config vars
213
+
214
+ The `config_vars` command is useful to interact with Heroku config variables.
215
+
216
+ ```sh
217
+ # The `list` command lists all the Heroku config variables
218
+ neetob heroku config_vars list --apps "neeto-*-production"
219
+
220
+ # We can list specific Heroku config variables using `keys` option
221
+ neetob heroku config_vars list --apps "neeto-*-production" --keys key1 key2 key3
222
+
223
+ # We can also use a file to specify required config vars for `list` command
224
+ # Checkout the `data/config-vars-list.json` file for the required structure.
225
+ neetob heroku config_vars list --apps "neeto-*-production" --path \
226
+ neetob/data/config-vars-list.json
227
+
228
+ # The `audit` command will check the config variables against the JSON file named as
229
+ # `required-config-vars.json` that is present inside the `data` directory at the root of
230
+ # installed `neetob` gem.
231
+ neetob heroku config_vars audit --apps "neeto-*-production"
232
+
233
+ # The `audit` command can also be used with a different JSON file using `--path` option.
234
+ neetob heroku config_vars audit --path ~/Desktop/config.json --apps "neeto-*-production"
235
+
236
+ # The `upsert` command adds or updates the config variables from the
237
+ # `data/config-vars-upsert.json` file present at the root of installed `neetob` gem.
238
+ neetob heroku config_vars upsert --apps "neeto-*-staging"
239
+
240
+ # The `remove` command is used to delete `config_vars`.
241
+ neetob heroku config_vars remove --keys=TEST_KEY_1 TEST_KEY_2 --apps "neeto-*-staging"
242
+ ```
243
+
244
+ We can use a custom JSON file with `upsert` command using the `path` option.
245
+
246
+ For example, assume we have a file named `config.json` on the Desktop, like so:
247
+
248
+ ```json
249
+ {
250
+ "NEETO_WIDGET_API_KEY": "jh4c1SC5cS5BvRbcBk4LD",
251
+ "NEETO_KB_API_KEY": "Lxh7vUKkRewfxSg4dg834",
252
+ "NEETO_CHAT_API_KEY": "sYnMTSCWLxkNbkHRXL1Xtd"
253
+ }
254
+ ```
255
+
256
+ To update the above-mentioned config variables to all staging apps, we can use the upsert command like so:
257
+
258
+ ```sh
259
+ neetob heroku config_vars upsert --path ~/Desktop/config.json --apps "neeto-*-staging"
260
+ ```
261
+
262
+ The `upsert` command can also be used to update and insert project-specific config variables.
263
+
264
+ For example, assume we have a file named `config.json` on the `Desktop` with the following properties:
265
+
266
+ ```json
267
+ {
268
+ "neeto-chat-web-staging": {
269
+ "NEETO_WIDGET_API_KEY": "jh4c1SC5cS5BvRbcBk4LD"
270
+ },
271
+ "neeto-testify-web-production": {
272
+ "NEETO_KB_API_KEY": "Lxh7vUKkRewfxSg4dg834"
273
+ },
274
+ "neeto-desk-web-staging": {
275
+ "NEETO_CHAT_API_KEY": "sYnMTSCWLxkNbkHRXL1Xtd"
276
+ }
277
+ }
278
+ ```
279
+
280
+ To update the above-mentioned config variables under the defined project, we can use the upsert command like so:
281
+
282
+ ```sh
283
+ neetob heroku config_vars upsert --path_with_project_keys ~/Desktop/config.json
284
+ ```
285
+
286
+ ### Access
287
+
288
+ We can list, add, and remove users from multiple Heroku apps using the `access` command.
289
+
290
+ ```sh
291
+ # The `list` command retrieves a list of all the users from Heroku apps.
292
+ neetob heroku access list --apps "neeto-*-production"
293
+
294
+ # Add new users to the Heroku apps.
295
+ neetob heroku access add --users oliver@bigbinary.com eve@bigbinary.com --apps "neeto-*-staging"
296
+
297
+ # Remove the users from the Heroku apps.
298
+ neetob heroku access remove --users oliver@bigbinary.com eve@bigbinary.com --apps \
299
+ "neeto-*-staging"
300
+ ```
301
+
302
+ ### Execute
303
+
304
+ Utilize the `execute` command to run a Heroku CLI command or a Rails console command for multiple neeto apps in one go.
305
+
306
+ ```sh
307
+ # We can check who has access to the neeto Heroku apps like so:
308
+ neetob heroku execute -c "heroku access" --apps "neeto-*-production"
309
+
310
+ # We can run a command in the Rails console for different neeto Heroku apps like so:
311
+ neetob heroku execute -c "Sidekiq::Cron::Job.destroy \"server_side_worker\"" --apps \
312
+ "neeto-*-staging" --rails
313
+ ```
314
+
315
+ ## Working with users
316
+
317
+ Using the `users` command, we can interact with the contributors of neeto applications.
318
+
319
+ ### Audit
320
+
321
+ The `audit` command enables the ability to comprehensively audit contributors across all neeto applications by providing functionality to check for contributors with multiple emails and users with third-party domain emails.
322
+
323
+ This command will search and use the neeto repos in the current working directory.
324
+ To fetch and update all neeto repos execute [make_repos_uptodate](#working-with-make-repos-uptodate) command before the `audit` command.
325
+
326
+ ```sh
327
+ neetob users audit
328
+ ```
329
+
330
+ ### Commits
331
+
332
+ Using `commits` command we can list the commits for a user in a defined duration.
333
+
334
+ ```sh
335
+ # The below mentioned command will open a list of all the commits across neeto
336
+ # product repos made by "udai1931" in the duration of last 6 months.
337
+ neetob users commits --author udai1931 --duration 6.months
338
+
339
+ # We can list commits for a specific product using `--apps` option.
340
+ neetob users commits --author udai1931 --duration 6.months --apps neeto-kb-web
341
+
342
+ # We can list commits for all neeto repos using the `--all-neeto-repos` option.
343
+ neetob users commits --author udai1931 --duration 6.months --all-neeto-repos
344
+ ```
345
+
346
+ ## Working with Make Repos Uptodate
347
+
348
+ Using the `make_repos_uptodate` command, we can uptodate all neeto repos.
349
+ The list of neeto repos is picked up from [neeto_compliance](https://github.com/bigbinary/neeto-compliance/blob/main/lib/neeto_compliance/neeto_repos.rb).
350
+
351
+ ```sh
352
+ neetob make_repos_uptodate
353
+
354
+ # We have a `--all-neeto-repos` option for this command too so that we can
355
+ # fetch and update all the neeto repos in the current working directory.
356
+ neetob make_repos_uptodate --all-neeto-repos
357
+ ```
358
+
359
+ Executing the above mentioned command will check and clone all the missing neeto repos in the current working directory and will update all of them to the latest version. After the execution of command the directories will look something like this:
360
+
361
+ ```
362
+ neeto-chat-web
363
+ neeto-desk-web
364
+ neeto-kb-web
365
+ ```
366
+
367
+ ## Working with local Repos
368
+
369
+ Using the `local` command, we can interact with the local neeto repos.
370
+
371
+ ### ls
372
+
373
+ The `ls` command can list the files from all the local neeto repos.
374
+
375
+ This command will search and use the neeto repos in the current working directory.
376
+ To fetch and update all neeto repos execute [make_repos_uptodate](#working-with-make-repos-uptodate) command before the `ls` command.
377
+
378
+ ```sh
379
+ # The `ls` command will list all the files in the root directory of neeto repos.
380
+ neetob local ls --apps "*"
381
+
382
+ # The `ls` command can also list files in a specific directory using the
383
+ # `--dir` option.
384
+ neetob local ls --dir public --apps "*"
385
+
386
+ # We can also list files in a nested directory.
387
+ neetob local ls --dir app/controllers --apps "*"
388
+ ```
389
+
390
+ ## Testing
391
+
392
+ For testing `github` commands use - [neeto-dummy](https://github.com/bigbinary/neeto-dummy) repo.
393
+
394
+ For testing `heroku` commands use - [neeto-dummy](https://dashboard.heroku.com/apps/neeto-dummy) app.
395
+
396
+ **Note:** Contact your respective Team Lead if you don't have access.
data/Rakefile ADDED
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "bundler/gem_tasks"
4
+ require "rake/testtask"
5
+
6
+ Rake::TestTask.new(:test) do |t|
7
+ t.libs << "test"
8
+ t.libs << "lib"
9
+ t.test_files = FileList["test/**/*_test.rb"]
10
+ end
11
+
12
+ require "rubocop/rake_task"
13
+
14
+ RuboCop::RakeTask.new
15
+
16
+ task default: %i[test rubocop]
File without changes
@@ -0,0 +1,25 @@
1
+ // Check out the official [documentation](https://docs.github.com/en/rest/branches/branch-protection#update-branch-protection)
2
+ // by Github to know about all the available parameters or options to update different branch protection rules.
3
+ {
4
+ "required_status_checks": {
5
+ "strict": true,
6
+ "contexts": ["ci/semaphoreci/pr: cicheck"]
7
+ },
8
+ "required_conversation_resolution": true,
9
+ "has_required_deployments": true,
10
+ "required_pull_request_reviews": {
11
+ "dismiss_stale_reviews": false,
12
+ "require_last_push_approval": false,
13
+ "require_code_owner_reviews": false,
14
+ "required_approving_review_count": 0
15
+ },
16
+ "required_signatures": false,
17
+ "enforce_admins": false,
18
+ "required_linear_history": false,
19
+ "allow_force_pushes": false,
20
+ "allow_deletions": true,
21
+ "block_creations": false,
22
+ "lock_branch": false,
23
+ "allow_fork_syncing": false,
24
+ "restrictions": null
25
+ }
@@ -0,0 +1,18 @@
1
+ {
2
+ "RACK_ENV": "production",
3
+ "RAILS_ENV": "production",
4
+ "AWS_REGION": "us-east-1",
5
+ "DEFAULT_SUBDOMAIN": "app",
6
+ "ENABLE_SSO": "true",
7
+ "NODE_MODULES_CACHE": "true",
8
+ "RAILS_LOG_TO_STDOUT": "enabled",
9
+ "RAILS_SERVE_STATIC_FILES": "enabled",
10
+ "SIDEKIQ_WEB_PASSWORD": "oneringtorulethemall",
11
+ "SPARKPOST_ADDRESS": "smtp.sparkpostmail.com",
12
+ "SPARKPOST_DOMAIN": "neeto.com",
13
+ "YARN_CACHE": "true",
14
+ "YARN_PRODUCTION": "true",
15
+ "ZEROBOUNCE_API_KEY": "b74debc37c9747fc84e79d7fb4dbdd68",
16
+ "AREA51_AUTHORIZED_EMAILS":"neeraj@bigbinary.com,unnikrishnan.kp@bigbinary.com,subin.siby@bigbinary.com"
17
+
18
+ }
@@ -0,0 +1 @@
1
+ ["key1"]
@@ -0,0 +1,197 @@
1
+ [
2
+ {
3
+ "name": "0.25D",
4
+ "description": "Estimate - 2 hours",
5
+ "color": "B0C4DE"
6
+ },
7
+ {
8
+ "name": "0.5D",
9
+ "description": "Estimate - 4 hours",
10
+ "color": "B0C4DE"
11
+ },
12
+ {
13
+ "name": "0.75D",
14
+ "description": "Estimate - 6 hours",
15
+ "color": "B0C4DE"
16
+ },
17
+ {
18
+ "name": "1D",
19
+ "description": "Estimate - 8 hours",
20
+ "color": "B0C4DE"
21
+ },
22
+ {
23
+ "name": "1.25D",
24
+ "description": "Estimate - 10 hours",
25
+ "color": "B0C4DE"
26
+ },
27
+ {
28
+ "name": "1.5D",
29
+ "description": "Estimate - 12 hours",
30
+ "color": "B0C4DE"
31
+ },
32
+ {
33
+ "name": "1.75D",
34
+ "description": "Estimate - 14 hours",
35
+ "color": "B0C4DE"
36
+ },
37
+ {
38
+ "name": "2D",
39
+ "description": "Estimate - 16 hours",
40
+ "color": "B0C4DE"
41
+ },
42
+ {
43
+ "name": "accepted",
44
+ "description": "The issue has been reviewed and considered a valid issue.",
45
+ "color": "A2D9CE"
46
+ },
47
+ {
48
+ "name": "backend",
49
+ "description": "Deals with Ruby & Rails code majorly.",
50
+ "color": "C2E0C6"
51
+ },
52
+ {
53
+ "name": "bug",
54
+ "description": "Something isn't working.",
55
+ "color": "D73A4A"
56
+ },
57
+ {
58
+ "name": "cypress-completed",
59
+ "description": "Cypress tests have finished running.",
60
+ "color": "FEF2C0"
61
+ },
62
+ {
63
+ "name": "cypress-flaky-test",
64
+ "description": "Fix cypress flaky tests.",
65
+ "color": "FEF2C0"
66
+ },
67
+ {
68
+ "name": "cypress-happy-path-completed",
69
+ "description": "Cypress happy path tests have finished running.",
70
+ "color": "FEF2C0"
71
+ },
72
+ {
73
+ "name": "cypress-happy-path-run",
74
+ "description": "Run the Cypress tests with the tag happy-path.",
75
+ "color": "FEF2C0"
76
+ },
77
+ {
78
+ "name": "cypress-happy-path-triggered",
79
+ "description": "Cypress happy path tests have been triggered.",
80
+ "color": "FEF2C0"
81
+ },
82
+ {
83
+ "name": "cypress-needed",
84
+ "description": "Cypress tests need to be written.",
85
+ "color": "FEF2C0"
86
+ },
87
+ {
88
+ "name": "cypress-run",
89
+ "description": "Run the Cypress tests.",
90
+ "color": "FEF2C0"
91
+ },
92
+ {
93
+ "name": "cypress-triggered",
94
+ "description": "Cypress tests have been triggered.",
95
+ "color": "FEF2C0"
96
+ },
97
+ {
98
+ "name": "documentation",
99
+ "description": "Improvements or additions to documentation.",
100
+ "color": "0075CA"
101
+ },
102
+ {
103
+ "name": "enhancement",
104
+ "description": "Enhancement or feature request.",
105
+ "color": "A2EEEF"
106
+ },
107
+ {
108
+ "name": "epic",
109
+ "description": "Will get closed when sub-issues fixed and this issue tracked in monthly milestone.",
110
+ "color": "6A5ACD"
111
+ },
112
+ {
113
+ "name": "frontend",
114
+ "description": "Deals with JS(React or JS configs etc) code majorly.",
115
+ "color": "C2E0C6"
116
+ },
117
+ {
118
+ "name": "high-priority",
119
+ "description": "Urgent fix required. Should be done within a day at max.",
120
+ "color": "B60205"
121
+ },
122
+ {
123
+ "name": "honeybadger",
124
+ "description": "Issue created by honeybadger.",
125
+ "color": "D3D3D3"
126
+ },
127
+ {
128
+ "name": "low-priority",
129
+ "description": "Other open issues can be taken up before this one.",
130
+ "color": "BFDADC"
131
+ },
132
+ {
133
+ "name": "neeto*-dependent",
134
+ "description": "This issue depends upon some other issue from neeto engines/frontend packages.",
135
+ "color": "E54D82"
136
+ },
137
+ {
138
+ "name": "on-hold",
139
+ "description": "Reason should be specified as a comment before putting issue/PR on-hold.",
140
+ "color": "E54D82"
141
+ },
142
+ {
143
+ "name": "perf-optimization",
144
+ "description": "Performance improvements, load testing, profiling etc.",
145
+ "color": "CAEE3E"
146
+ },
147
+ {
148
+ "name": "POC",
149
+ "description": "Proof of concept or doing spike work.",
150
+ "color": "008080"
151
+ },
152
+ {
153
+ "name": "PR",
154
+ "description": "The issue has a PR associated with it.",
155
+ "color": "D4C5F9"
156
+ },
157
+ {
158
+ "name": "priority",
159
+ "description": "Means I am waiting for this issue to be fixed in order to take care of other issues.",
160
+ "color": "BA080D"
161
+ },
162
+ {
163
+ "name": "refactoring",
164
+ "description": "Code changes, better way to organize code etc.",
165
+ "color": "CAEE3E"
166
+ },
167
+ {
168
+ "name": "security",
169
+ "description": "Vulnerabilities, security concerns etc.",
170
+ "color": "BA080D"
171
+ },
172
+ {
173
+ "name": "UI",
174
+ "description": "UI/CSS work needed.",
175
+ "color": "8250df"
176
+ },
177
+ {
178
+ "name": "UI-weekly-milestone",
179
+ "description": "This issue is part of the UI weekly milestone.",
180
+ "color": "F9D0C4"
181
+ },
182
+ {
183
+ "name": "UX-design-needed",
184
+ "description": "This issue is part of the UI weekly milestone.",
185
+ "color": "366FB9"
186
+ },
187
+ {
188
+ "name": "engineer-needed",
189
+ "description": "Engineer is needed to work on the issue",
190
+ "color": "#B0C4DE"
191
+ },
192
+ {
193
+ "name": "working",
194
+ "description": "This issue is part of the UI weekly milestone.",
195
+ "color": "D0ECE7"
196
+ }
197
+ ]
data/env.sample ADDED
@@ -0,0 +1 @@
1
+ AUTH_PARAMS='{"provider": "github","client_id": "9aefff37f98713262fd0","grant_type": "urn:ietf:params:oauth:grant-type:device_code","auth_uris": {"auth_req": "https://github.com/login/device/code","token_req": "https://github.com/login/oauth/access_token"},"scope": "repo,user"}'
data/exe/neetob ADDED
@@ -0,0 +1,25 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ require "dotenv"
5
+ require "bundler/setup"
6
+
7
+ Dotenv.load(
8
+ File.expand_path("../.env", __dir__)
9
+ )
10
+
11
+ base_path = File.expand_path("../lib", __dir__)
12
+
13
+ if File.exist?(base_path)
14
+ require_relative "../lib/neetob"
15
+ else
16
+ require "neetob"
17
+ end
18
+
19
+ args = ARGV
20
+
21
+ begin
22
+ Neetob::CLI.start(args, debug: true)
23
+ rescue Exception => e
24
+ Neetob::ExceptionHandler.new(e).process
25
+ end