gitlab-triage 1.42.2 → 1.43.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.git-blame-ignore-revs +43 -0
- data/.gitlab-ci.yml +51 -50
- data/.rubocop.yml +27 -0
- data/.rubocop_todo.yml +6 -442
- data/.ruby-version +1 -1
- data/.tool-versions +1 -1
- data/Gemfile +2 -0
- data/Guardfile +2 -0
- data/Rakefile +2 -0
- data/bin/gitlab-triage +1 -0
- data/gitlab-triage.gemspec +5 -2
- data/lib/gitlab/triage/action/base.rb +5 -3
- data/lib/gitlab/triage/action.rb +2 -0
- data/lib/gitlab/triage/api_query_builders/base_query_param_builder.rb +2 -0
- data/lib/gitlab/triage/api_query_builders/date_query_param_builder.rb +3 -1
- data/lib/gitlab/triage/api_query_builders/multi_query_param_builder.rb +2 -0
- data/lib/gitlab/triage/api_query_builders/single_query_param_builder.rb +2 -0
- data/lib/gitlab/triage/command_builders/base_command_builder.rb +2 -0
- data/lib/gitlab/triage/command_builders/cc_command_builder.rb +2 -0
- data/lib/gitlab/triage/command_builders/comment_command_builder.rb +2 -0
- data/lib/gitlab/triage/command_builders/label_command_builder.rb +3 -1
- data/lib/gitlab/triage/command_builders/move_command_builder.rb +2 -0
- data/lib/gitlab/triage/command_builders/remove_label_command_builder.rb +2 -0
- data/lib/gitlab/triage/command_builders/status_command_builder.rb +2 -0
- data/lib/gitlab/triage/command_builders/text_content_builder.rb +2 -2
- data/lib/gitlab/triage/engine.rb +7 -2
- data/lib/gitlab/triage/errors/network.rb +2 -0
- data/lib/gitlab/triage/errors.rb +2 -0
- data/lib/gitlab/triage/expand_condition/expansion.rb +2 -0
- data/lib/gitlab/triage/expand_condition/list.rb +3 -1
- data/lib/gitlab/triage/expand_condition/sequence.rb +3 -1
- data/lib/gitlab/triage/expand_condition.rb +2 -0
- data/lib/gitlab/triage/filters/assignee_member_conditions_filter.rb +2 -0
- data/lib/gitlab/triage/filters/author_member_conditions_filter.rb +2 -0
- data/lib/gitlab/triage/filters/base_conditions_filter.rb +3 -3
- data/lib/gitlab/triage/filters/branch_date_filter.rb +2 -0
- data/lib/gitlab/triage/filters/branch_protected_filter.rb +2 -0
- data/lib/gitlab/triage/filters/discussions_conditions_filter.rb +2 -0
- data/lib/gitlab/triage/filters/issue_date_conditions_filter.rb +2 -0
- data/lib/gitlab/triage/filters/member_conditions_filter.rb +4 -4
- data/lib/gitlab/triage/filters/merge_request_date_conditions_filter.rb +2 -0
- data/lib/gitlab/triage/filters/name_conditions_filter.rb +2 -0
- data/lib/gitlab/triage/filters/no_additional_labels_conditions_filter.rb +2 -0
- data/lib/gitlab/triage/filters/ruby_conditions_filter.rb +2 -0
- data/lib/gitlab/triage/filters/votes_conditions_filter.rb +2 -0
- data/lib/gitlab/triage/graphql_network.rb +2 -0
- data/lib/gitlab/triage/graphql_queries/query_builder.rb +3 -1
- data/lib/gitlab/triage/graphql_queries/query_param_builders/array_param_builder.rb +2 -0
- data/lib/gitlab/triage/graphql_queries/query_param_builders/base_param_builder.rb +2 -0
- data/lib/gitlab/triage/graphql_queries/query_param_builders/date_param_builder.rb +3 -1
- data/lib/gitlab/triage/limiters/base_limiter.rb +2 -0
- data/lib/gitlab/triage/limiters/date_field_limiter.rb +2 -0
- data/lib/gitlab/triage/network.rb +2 -0
- data/lib/gitlab/triage/network_adapters/base_adapter.rb +2 -0
- data/lib/gitlab/triage/network_adapters/graphql_adapter.rb +2 -0
- data/lib/gitlab/triage/network_adapters/httparty_adapter.rb +2 -0
- data/lib/gitlab/triage/network_adapters/test_adapter.rb +3 -1
- data/lib/gitlab/triage/option_parser.rb +2 -0
- data/lib/gitlab/triage/options.rb +2 -0
- data/lib/gitlab/triage/param_builders/date_param_builder.rb +2 -0
- data/lib/gitlab/triage/resource/base.rb +3 -0
- data/lib/gitlab/triage/resource/instance_version.rb +2 -0
- data/lib/gitlab/triage/resource/milestone.rb +2 -0
- data/lib/gitlab/triage/rest_api_network.rb +2 -0
- data/lib/gitlab/triage/retryable.rb +2 -0
- data/lib/gitlab/triage/ui.rb +2 -0
- data/lib/gitlab/triage/url_builders/url_builder.rb +2 -0
- data/lib/gitlab/triage/utils.rb +2 -0
- data/lib/gitlab/triage/validators/limiter_validator.rb +3 -3
- data/lib/gitlab/triage/validators/params_validator.rb +3 -3
- data/lib/gitlab/triage/version.rb +1 -1
- data/lib/gitlab/triage.rb +2 -0
- metadata +11 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 95d1d38e50b3032593baffe5e3122da139f542294529cadaaffa5e2861d0a428
|
4
|
+
data.tar.gz: 83ac90f1c5815c5a39a6cb5d3d84b34112a1a3a72f2dd9a9481291bc171648c3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8d0aef0429e6892959468c199b0bddbb18ecf02bf864ee038f59b01f35e779a200724e8841b3f603add6267a5a6b3c7746520d10bc48d77c2a6a025e5d3ddaa2
|
7
|
+
data.tar.gz: 70ea6376e7855ce5ac2207d0f0dc779d8d4e32eb800192c5d3ec8cbfa546425797087525c6a281bfd5513b4d8d4619cf6a81e7fd2e59b7c48d77972653ca5b37
|
@@ -0,0 +1,43 @@
|
|
1
|
+
# This file contains revisions to be ignored by git blame.
|
2
|
+
# These revisions are expected to be formatting-only changes.
|
3
|
+
#
|
4
|
+
# Calling `git blame --ignore-revs-file .git-blame-ignore-revs` will
|
5
|
+
# tell git blame to ignore changes made by these revisions when
|
6
|
+
# assigning blame, as if the change never happened.
|
7
|
+
#
|
8
|
+
# You can enable this as a default for your local repository by running
|
9
|
+
# `git config blame.ignoreRevsFile .git-blame-ignore-revs`
|
10
|
+
# This will probably be automatically picked by your IDE
|
11
|
+
# (VSCode+GitLens and JetBrains products are confirmed to this)
|
12
|
+
#
|
13
|
+
# Important: if you are switching to the branch without this file,
|
14
|
+
# `git blame` will fail with an error
|
15
|
+
#
|
16
|
+
# Guidelines:
|
17
|
+
# - Only large automated refactorings are expected to be included in this file.
|
18
|
+
# Do not add a new revision just because it is deemed trivial or unimportant
|
19
|
+
# - When adding a single revision, use inline comments to link relevant issues and merge requests
|
20
|
+
# Example:
|
21
|
+
#
|
22
|
+
# # d4a8b7307acc2dc8a8833ccfa65426ad28b3ffc9 # https://gitlab.com/gitlab-org/frontend/rfcs/-/issues/60
|
23
|
+
#
|
24
|
+
# - When adding multiple revisions precede each addition (this could be multiple revisions) with a link to
|
25
|
+
# line with word START and link to relevant issue/MR/epic and conclude with line END and link to the
|
26
|
+
# same issue/MR/epic
|
27
|
+
# Example:
|
28
|
+
# # START https://gitlab.com/gitlab-org/issues/12345
|
29
|
+
# 6f0bd2d8a1e6cd2e794cd39976e9756e0c85ac66
|
30
|
+
# d53974df11dbc22cbea9dc7dcbc9896c25979a27
|
31
|
+
# ... <rest of the list>
|
32
|
+
# # END https://gitlab.com/gitlab-org/issues/12345
|
33
|
+
# - Please append new lines to the end of the file, no matter of real chronological
|
34
|
+
# order of revisions
|
35
|
+
# - Since this is using hashes for reformatting it might be a good idea to update
|
36
|
+
# this file in separate MR when relevant changes already landed in master. By
|
37
|
+
# utilizing this manner you will be safe from random rebase/squash issues
|
38
|
+
# - Only put full 40-character hashes on this list
|
39
|
+
|
40
|
+
# START https://gitlab.com/gitlab-org/ruby/gems/gitlab-triage/-/issues/340
|
41
|
+
49e0b4f890c4f38ae586c6b1bdca5ff3b0c04af1
|
42
|
+
aba491f68f0d4a6c088deb6cb281755d6c7a7f0b
|
43
|
+
# END https://gitlab.com/gitlab-org/ruby/gems/gitlab-triage/-/issues/340
|
data/.gitlab-ci.yml
CHANGED
@@ -5,9 +5,10 @@ stages:
|
|
5
5
|
- deploy
|
6
6
|
|
7
7
|
default:
|
8
|
-
image: ruby:3.0
|
9
8
|
tags:
|
10
9
|
- gitlab-org
|
10
|
+
|
11
|
+
.ruby-cache: &ruby-cache
|
11
12
|
cache:
|
12
13
|
key:
|
13
14
|
files:
|
@@ -17,9 +18,13 @@ default:
|
|
17
18
|
- vendor/ruby
|
18
19
|
- Gemfile.lock
|
19
20
|
policy: pull
|
21
|
+
|
22
|
+
.use-ruby:
|
23
|
+
image: ruby:3.2
|
24
|
+
<<: *ruby-cache
|
20
25
|
before_script:
|
21
26
|
- ruby --version
|
22
|
-
- gem install bundler --no-document
|
27
|
+
- gem install bundler --no-document
|
23
28
|
- bundle --version
|
24
29
|
- bundle install --jobs $(nproc) --path=vendor --retry 3 --quiet
|
25
30
|
- bundle check
|
@@ -33,23 +38,11 @@ workflow:
|
|
33
38
|
# For tags, create a pipeline.
|
34
39
|
- if: '$CI_COMMIT_TAG'
|
35
40
|
|
36
|
-
.use-docker-in-docker:
|
37
|
-
image: docker:${DOCKER_VERSION}
|
38
|
-
services:
|
39
|
-
- docker:${DOCKER_VERSION}-dind
|
40
|
-
variables:
|
41
|
-
DOCKER_VERSION: "19.03.0"
|
42
|
-
DOCKER_DRIVER: overlay2
|
43
|
-
DOCKER_HOST: tcp://docker:2375
|
44
|
-
DOCKER_TLS_CERTDIR: ""
|
45
|
-
tags:
|
46
|
-
# See https://gitlab.com/gitlab-com/www-gitlab-com/-/issues/7019 for tag descriptions
|
47
|
-
- gitlab-org-docker
|
48
|
-
|
49
41
|
###################
|
50
42
|
## Prepare stage ##
|
51
43
|
###################
|
52
44
|
setup-test-env:
|
45
|
+
extends: .use-ruby
|
53
46
|
stage: prepare
|
54
47
|
script:
|
55
48
|
- echo "Setup done!"
|
@@ -63,6 +56,7 @@ setup-test-env:
|
|
63
56
|
## Test stage ##
|
64
57
|
################
|
65
58
|
rubocop:
|
59
|
+
extends: .use-ruby
|
66
60
|
stage: test
|
67
61
|
needs: ["setup-test-env"]
|
68
62
|
dependencies: ["setup-test-env"]
|
@@ -73,43 +67,26 @@ rubocop:
|
|
73
67
|
paths:
|
74
68
|
- .cache/rubocop_cache/
|
75
69
|
|
76
|
-
# We need to copy this job's definition from the Code-Quality.gitlab-ci.yml
|
77
|
-
# template because `only` is set without `refs`, so it takes precedence over default workflow rules.
|
78
|
-
# See https://gitlab.com/gitlab-org/gitlab-ce/issues/66767.
|
79
|
-
code_quality:
|
80
|
-
extends: .use-docker-in-docker
|
81
|
-
stage: test
|
82
|
-
allow_failure: true
|
83
|
-
variables:
|
84
|
-
DOCKER_TLS_CERTDIR: ""
|
85
|
-
before_script: []
|
86
|
-
script:
|
87
|
-
- |
|
88
|
-
if ! docker info &>/dev/null; then
|
89
|
-
if [ -z "$DOCKER_HOST" -a "$KUBERNETES_PORT" ]; then
|
90
|
-
export DOCKER_HOST='tcp://localhost:2375'
|
91
|
-
fi
|
92
|
-
fi
|
93
|
-
- docker run
|
94
|
-
--env SOURCE_CODE="$PWD"
|
95
|
-
--volume "$PWD":/code
|
96
|
-
--volume /var/run/docker.sock:/var/run/docker.sock
|
97
|
-
"registry.gitlab.com/gitlab-org/security-products/codequality:12-0-stable" /code
|
98
|
-
artifacts:
|
99
|
-
reports:
|
100
|
-
codequality: gl-code-quality-report.json
|
101
|
-
expire_in: 1 week
|
102
|
-
|
103
70
|
specs:
|
71
|
+
extends: .use-ruby
|
104
72
|
needs: ["setup-test-env"]
|
105
73
|
stage: test
|
106
74
|
script:
|
107
75
|
- bundle exec rake spec
|
76
|
+
image: $RUBY_IMAGE
|
77
|
+
parallel:
|
78
|
+
matrix:
|
79
|
+
- RUBY_IMAGE:
|
80
|
+
- ruby:3.0
|
81
|
+
- ruby:3.1
|
82
|
+
- ruby:3.2
|
83
|
+
- ruby:3.3
|
108
84
|
|
109
85
|
##################
|
110
86
|
## Triage stage ##
|
111
87
|
##################
|
112
88
|
dry-run:gitlab-triage:
|
89
|
+
extends: .use-ruby
|
113
90
|
needs: ["setup-test-env"]
|
114
91
|
stage: triage
|
115
92
|
script:
|
@@ -129,11 +106,35 @@ dry-run:custom:
|
|
129
106
|
allow_failure: true
|
130
107
|
|
131
108
|
include:
|
132
|
-
-
|
133
|
-
-
|
134
|
-
-
|
135
|
-
-
|
136
|
-
-
|
137
|
-
|
138
|
-
|
139
|
-
|
109
|
+
- component: gitlab.com/components/code-quality/code-quality@~latest
|
110
|
+
- component: gitlab.com/components/sast/sast@~latest
|
111
|
+
- component: gitlab.com/components/secret-detection/secret-detection@~latest
|
112
|
+
- component: gitlab.com/gitlab-org/components/danger-review/danger-review@~latest
|
113
|
+
- component: gitlab.com/gitlab-org/components/gem-release/gem-release@~latest
|
114
|
+
- template: Jobs/Dependency-Scanning.gitlab-ci.yml
|
115
|
+
|
116
|
+
.component-general-rules: &component-general-rules
|
117
|
+
rules:
|
118
|
+
- if: '$CI_MERGE_REQUEST_IID'
|
119
|
+
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
|
120
|
+
|
121
|
+
code_quality:
|
122
|
+
# We explicitly set dependencies here as the component sets them to []
|
123
|
+
# This allows us to get the cache from the setup job that includes the Gemfile.lock
|
124
|
+
dependencies: ["setup-test-env"]
|
125
|
+
tags:
|
126
|
+
- gitlab-org-docker
|
127
|
+
# We explicitly override allow_failure here as the component sets it to true
|
128
|
+
# Can be moved to a component input after: https://gitlab.com/components/code-quality/-/merge_requests/8
|
129
|
+
allow_failure: false
|
130
|
+
<<: *ruby-cache
|
131
|
+
<<: *component-general-rules
|
132
|
+
|
133
|
+
semgrep-sast:
|
134
|
+
<<: *component-general-rules
|
135
|
+
|
136
|
+
gemnasium-dependency_scanning:
|
137
|
+
<<: *component-general-rules
|
138
|
+
|
139
|
+
secret_detection:
|
140
|
+
<<: *component-general-rules
|
data/.rubocop.yml
CHANGED
@@ -24,3 +24,30 @@ GitlabSecurity/PublicSend:
|
|
24
24
|
# FIXME: this is not an entirely good practice and we should aim to correct these!
|
25
25
|
# See https://gitlab.com/gitlab-org/ruby/gems/gitlab-triage/-/issues/342
|
26
26
|
- 'spec/**/*.rb'
|
27
|
+
|
28
|
+
# rationale: no easy autocorrection, makes the specs fail.
|
29
|
+
# should be possible to fix with some additional work, but
|
30
|
+
# the gains do not seem to be worth the effort.
|
31
|
+
RSpec/Rails/TravelAround:
|
32
|
+
Enabled: false
|
33
|
+
|
34
|
+
# rationale: we upload via CI - so this is currently not supported in our workflow.
|
35
|
+
# context: https://gitlab.com/gitlab-org/ruby/gems/gitlab-triage/-/merge_requests/313#note_1601520801
|
36
|
+
Gemspec/RequireMFA:
|
37
|
+
Enabled: false
|
38
|
+
|
39
|
+
# rationale: it's okay to have empty blocks in specs
|
40
|
+
Lint/EmptyBlock:
|
41
|
+
Exclude:
|
42
|
+
- 'spec/**/*.rb'
|
43
|
+
|
44
|
+
# rationale: these files do not seem overly harmful to violate this rule,
|
45
|
+
# but overall, seems good to keep enabled
|
46
|
+
RSpec/IndexedLet:
|
47
|
+
Exclude:
|
48
|
+
- 'spec/integration/select_issues_by_weight_spec.rb'
|
49
|
+
- 'spec/integration/select_merge_requests_by_source_branch_spec.rb'
|
50
|
+
|
51
|
+
# rationale: Maybe we should? For now, let's keep it disabled and revisit at a later point.
|
52
|
+
Rails/Output:
|
53
|
+
Enabled: false
|