From a8138097767f51210ea99711fce40ae6c13616ba Mon Sep 17 00:00:00 2001 From: Samuel Bodin <1637651+bodinsamuel@users.noreply.github.com> Date: Wed, 13 Sep 2023 14:34:18 +0200 Subject: [PATCH] fix(rules): add Jira --- src/rules/__snapshots__/index.test.ts.snap | 1 + src/rules/saas/index.ts | 1 + src/rules/saas/jira.ts | 21 +++++++++++ .../__snapshots__/component.test.ts.snap | 6 ++++ .../__snapshots__/component.test.ts.snap | 36 +++++++++++++++++++ .../__snapshots__/component.test.ts.snap | 6 ++++ .../php/__snapshots__/component.test.ts.snap | 6 ++++ .../ruby/__snapshots__/lockfile.test.ts.snap | 6 ++++ .../__snapshots__/resource.test.ts.snap | 1 + 9 files changed, 84 insertions(+) create mode 100644 src/rules/saas/jira.ts diff --git a/src/rules/__snapshots__/index.test.ts.snap b/src/rules/__snapshots__/index.test.ts.snap index bdf35bed..a571100c 100644 --- a/src/rules/__snapshots__/index.test.ts.snap +++ b/src/rules/__snapshots__/index.test.ts.snap @@ -132,6 +132,7 @@ exports[`all > should match everything 1`] = ` "hypertune", "influxdb", "jenkins", + "jira", "kibana", "klaviyo", "koa", diff --git a/src/rules/saas/index.ts b/src/rules/saas/index.ts index 17948c39..09a6ccb6 100644 --- a/src/rules/saas/index.ts +++ b/src/rules/saas/index.ts @@ -24,6 +24,7 @@ import './hotjar.js'; import './hubspot.js'; import './huggingface.js'; import './hypertune.js'; +import './jira.js'; import './klaviyo.js'; import './launchdarkly.js'; import './logrocket.js'; diff --git a/src/rules/saas/jira.ts b/src/rules/saas/jira.ts new file mode 100644 index 00000000..e2ecdd21 --- /dev/null +++ b/src/rules/saas/jira.ts @@ -0,0 +1,21 @@ +import { register } from '../../register.js'; + +register({ + tech: 'jira', + name: 'Jira', + type: 'saas', + dependencies: [ + { type: 'githubAction', name: 'atlassian/gajira-todo' }, + { type: 'githubAction', name: 'github/ghas-jira-integration' }, + { type: 'githubAction', name: 'atlassian/gajira-transition' }, + { type: 'githubAction', name: 'atlassian/gajira-create' }, + { type: 'githubAction', name: 'atlassian/gajira-cli' }, + { type: 'githubAction', name: 'atlassian/gajira-find-issue-key' }, + { type: 'githubAction', name: 'atlassian/gajira-comment' }, + { type: 'docker', name: 'atlassian/jira-software' }, + { type: 'npm', name: 'jira.js' }, + { type: 'php', name: 'lesstif/php-jira-rest-client' }, + { type: 'ruby', name: 'jira-ruby' }, + { type: 'terraform.resource', name: 'gitlab_integration_jira' }, + ], +}); diff --git a/src/rules/spec/docker/__snapshots__/component.test.ts.snap b/src/rules/spec/docker/__snapshots__/component.test.ts.snap index 2dfc51e4..f560d02f 100644 --- a/src/rules/spec/docker/__snapshots__/component.test.ts.snap +++ b/src/rules/spec/docker/__snapshots__/component.test.ts.snap @@ -28,6 +28,7 @@ exports[`docker > should match everything 1`] = ` "httpd", "influxdb", "jenkins", + "jira", "kibana", "mariadb", "matomo", @@ -109,6 +110,11 @@ exports[`docker > should match everything 2`] = ` "apache/storm", "0.0.0", ], + [ + "docker", + "atlassian/jira-software", + "0.0.0", + ], [ "docker", "bitnami/discourse", diff --git a/src/rules/spec/githubActions/__snapshots__/component.test.ts.snap b/src/rules/spec/githubActions/__snapshots__/component.test.ts.snap index fab37afb..06999398 100644 --- a/src/rules/spec/githubActions/__snapshots__/component.test.ts.snap +++ b/src/rules/spec/githubActions/__snapshots__/component.test.ts.snap @@ -29,6 +29,7 @@ exports[`docker > should match all dependencies 1`] = ` "github.pages", "hashicorp_vault", "heroku", + "jira", "kubernetes", "launchdarkly", "netlify", @@ -132,6 +133,36 @@ exports[`docker > should match all dependencies 2`] = ` "appleboy/lambda-action", "1", ], + [ + "githubAction", + "atlassian/gajira-cli", + "1", + ], + [ + "githubAction", + "atlassian/gajira-comment", + "1", + ], + [ + "githubAction", + "atlassian/gajira-create", + "1", + ], + [ + "githubAction", + "atlassian/gajira-find-issue-key", + "1", + ], + [ + "githubAction", + "atlassian/gajira-todo", + "1", + ], + [ + "githubAction", + "atlassian/gajira-transition", + "1", + ], [ "githubAction", "aws-actions/amazon-eks-fargate", @@ -237,6 +268,11 @@ exports[`docker > should match all dependencies 2`] = ` "getsentry/action-release", "1", ], + [ + "githubAction", + "github/ghas-jira-integration", + "1", + ], [ "githubAction", "google-github-actions/auth", diff --git a/src/rules/spec/nodejs/__snapshots__/component.test.ts.snap b/src/rules/spec/nodejs/__snapshots__/component.test.ts.snap index 89651740..70e8b566 100644 --- a/src/rules/spec/nodejs/__snapshots__/component.test.ts.snap +++ b/src/rules/spec/nodejs/__snapshots__/component.test.ts.snap @@ -76,6 +76,7 @@ exports[`npm > should match everything 1`] = ` "huggingface", "hypertune", "influxdb", + "jira", "koa", "kubernetes", "launchdarkly", @@ -869,6 +870,11 @@ exports[`npm > should match everything 2`] = ` "ioredis", "0.0.0", ], + [ + "npm", + "jira.js", + "0.0.0", + ], [ "npm", "jsforce", diff --git a/src/rules/spec/php/__snapshots__/component.test.ts.snap b/src/rules/spec/php/__snapshots__/component.test.ts.snap index b84c273f..d583b148 100644 --- a/src/rules/spec/php/__snapshots__/component.test.ts.snap +++ b/src/rules/spec/php/__snapshots__/component.test.ts.snap @@ -64,6 +64,7 @@ exports[`php > should match everything 1`] = ` "heroku", "hubspot", "influxdb", + "jira", "klaviyo", "kubernetes", "laravel", @@ -538,6 +539,11 @@ exports[`php > should match everything 2`] = ` "launchdarkly/server-sdk", "0.0.0", ], + [ + "php", + "lesstif/php-jira-rest-client", + "0.0.0", + ], [ "php", "longlang/phpkafka", diff --git a/src/rules/spec/ruby/__snapshots__/lockfile.test.ts.snap b/src/rules/spec/ruby/__snapshots__/lockfile.test.ts.snap index 642b7e66..8bc1cdb2 100644 --- a/src/rules/spec/ruby/__snapshots__/lockfile.test.ts.snap +++ b/src/rules/spec/ruby/__snapshots__/lockfile.test.ts.snap @@ -53,6 +53,7 @@ exports[`ruby (component) > should match everything 1`] = ` "hashicorp_vault", "heroku", "influxdb", + "jira", "kubernetes", "launchdarkly", "mailchimp", @@ -408,6 +409,11 @@ exports[`ruby (component) > should match everything 2`] = ` "jenkins_api_client", "1.0.0", ], + [ + "ruby", + "jira-ruby", + "1.0.0", + ], [ "ruby", "kubeclient", diff --git a/src/rules/spec/terraform/__snapshots__/resource.test.ts.snap b/src/rules/spec/terraform/__snapshots__/resource.test.ts.snap index 780bde1c..b48f596e 100644 --- a/src/rules/spec/terraform/__snapshots__/resource.test.ts.snap +++ b/src/rules/spec/terraform/__snapshots__/resource.test.ts.snap @@ -40,6 +40,7 @@ exports[`terraform (resource) > should match everything 1`] = ` "gcp.spanner", "gcp.sql", "gcp.tasks", + "jira", "terraform", ] `;