Commit 23e41b6a authored by Rémy Coutable's avatar Rémy Coutable

Merge branch 'alberts-static-analysis-as-if-foss' into 'master'

Add `static-analysis as-if-foss` job

See merge request gitlab-org/gitlab!60363
parents b7bfefb2 6a4be512
...@@ -250,13 +250,19 @@ update-static-analysis-cache: ...@@ -250,13 +250,19 @@ update-static-analysis-cache:
static-analysis: static-analysis:
extends: extends:
- .static-analysis-base - .static-analysis-base
- .rails:rules:code-backstage-qa - .static-analysis:rules:ee-and-foss
stage: test stage: test
parallel: 4 parallel: 4
script: script:
- run_timed_command "retry yarn install --frozen-lockfile" - run_timed_command "retry yarn install --frozen-lockfile"
- scripts/static-analysis - scripts/static-analysis
static-analysis as-if-foss:
extends:
- static-analysis
- .static-analysis:rules:as-if-foss
- .as-if-foss
rspec migration pg11: rspec migration pg11:
extends: extends:
- .rspec-base-pg11 - .rspec-base-pg11
......
...@@ -931,6 +931,25 @@ ...@@ -931,6 +931,25 @@
- <<: *if-merge-request - <<: *if-merge-request
changes: [".gitlab/ci/rails.gitlab-ci.yml"] changes: [".gitlab/ci/rails.gitlab-ci.yml"]
#########################
# Static analysis rules #
#########################
.static-analysis:rules:ee-and-foss:
rules:
- changes: *code-backstage-qa-patterns
.static-analysis:rules:as-if-foss:
rules:
- <<: *if-not-ee
when: never
- <<: *if-merge-request-title-as-if-foss
changes: *code-backstage-qa-patterns
- <<: *if-security-merge-request
changes: *code-backstage-qa-patterns
- <<: *if-merge-request
changes: *ci-patterns
####################### #######################
# Vendored gems rules # # Vendored gems rules #
####################### #######################
......
import * as Sentry from '@sentry/browser'; import * as Sentry from '@sentry/browser';
import { updateListQueries } from 'ee_else_ce/boards/constants';
import createBoardListMutation from 'ee_else_ce/boards/graphql/board_list_create.mutation.graphql';
import boardListsQuery from 'ee_else_ce/boards/graphql/board_lists.query.graphql';
import issueMoveListMutation from 'ee_else_ce/boards/graphql/issue_move_list.mutation.graphql';
import { import {
BoardType, BoardType,
ListType, ListType,
...@@ -12,7 +8,11 @@ import { ...@@ -12,7 +8,11 @@ import {
titleQueries, titleQueries,
subscriptionQueries, subscriptionQueries,
SupportedFilters, SupportedFilters,
} from '~/boards/constants'; updateListQueries,
} from 'ee_else_ce/boards/constants';
import createBoardListMutation from 'ee_else_ce/boards/graphql/board_list_create.mutation.graphql';
import boardListsQuery from 'ee_else_ce/boards/graphql/board_lists.query.graphql';
import issueMoveListMutation from 'ee_else_ce/boards/graphql/issue_move_list.mutation.graphql';
import { getIdFromGraphQLId } from '~/graphql_shared/utils'; import { getIdFromGraphQLId } from '~/graphql_shared/utils';
import createGqClient, { fetchPolicies } from '~/lib/graphql'; import createGqClient, { fetchPolicies } from '~/lib/graphql';
import { convertObjectPropsToCamelCase, urlParamsToObject } from '~/lib/utils/common_utils'; import { convertObjectPropsToCamelCase, urlParamsToObject } from '~/lib/utils/common_utils';
......
...@@ -68,6 +68,19 @@ export const updateListQueries = { ...@@ -68,6 +68,19 @@ export const updateListQueries = {
}, },
}; };
// re-export some FOSS constants so that lint does not yell
// https://gitlab.com/gitlab-org/gitlab/-/issues/329164
export {
BoardType,
ListType,
inactiveId,
flashAnimationDuration,
ISSUABLE,
titleQueries,
subscriptionQueries,
SupportedFilters,
} from '~/boards/constants';
export default { export default {
updateListQueries, updateListQueries,
DRAGGABLE_TAG, DRAGGABLE_TAG,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment