Commit 067995fb authored by Xavier Guimard's avatar Xavier Guimard

salsa: add --ci-config-path option

Feature asked by pkg-security team

Pushed using salsa mr
parent 468636ef
......@@ -11,6 +11,7 @@ devscripts (2.18.12) UNRELEASED; urgency=medium
+ Fix mr bug when colors are activated. MR: !92
+ Fix bad warning on unexistent project and downgrade messages to debug
level.
+ Add --ci-config-path option. MR: !96
* uscan:
+ Fix warning when grouped package is up to date.
* French translation update.
......
......@@ -16,7 +16,7 @@ foreach (qw(
mr_dst_project mr_remove_source_branch mr_src_branch mr_src_project
mr_title no_fail path private_token skip source_branch group group_id user
user_id tagpending tagpending_server_url email email_recipient
disable_email
disable_email ci_config_path
)
) {
has $_ => (is => 'rw');
......@@ -107,7 +107,8 @@ use constant keys => [
}
],
['no-skip', undef, sub { $_[0]->skip([]); $_[0]->skip_file(undef); }],
['desc!', 'SALSA_DESC', 'bool'],
['ci-config-path=s', 'SALSA_CI_CONFIG_PATH', qr/\./],
['desc!', 'SALSA_DESC', 'bool'],
['desc-pattern=s', 'SALSA_DESC_PATTERN', qr/\w/, 'Debian package %p'],
['enable-issues!'],
['disable-issues!'],
......
......@@ -194,6 +194,9 @@ sub desc {
} elsif ($self->config->enable_mr) {
push @res, merge_requests_enabled => 1;
}
if ($self->config->ci_config_path) {
push @res, ci_config_path => $self->config->ci_config_path;
}
return @res;
}
......
......@@ -44,9 +44,9 @@ sub _check_repo {
if ($prms{description} ne $project->{description});
}
# check issues/MR authorizations
foreach (qw(issues_enabled merge_requests_enabled)) {
foreach (qw(issues_enabled merge_requests_enabled ci_config_path)) {
push @err, "$_ should be $prms{$_}"
if (defined $prms{$_} and $project->{$_} != $prms{$_});
if (defined $prms{$_} and $project->{$_} ne $prms{$_});
}
# only public projects are accepted
push @err, "private" unless ($project->{visibility} eq "public");
......
......@@ -14,7 +14,7 @@ _salsa_completion () {
opts+=" --all --conf-file --no-conf --desc --no-desc --desc-pattern"
opts+=" --disable-kgb --disable-tagpending --group --group-id"
opts+=" --enable-issues --no-enable-issues --disable-issues"
opts+=" --enable-mr --no-enable-mr --disable-mr"
opts+=" --enable-mr --no-enable-mr --disable-mr --ci-config-path"
opts+=" --mr-allow-squash --no-mr-allow-squash --mr-desc --mr-title"
opts+=" --mr-dst_branch --mr-dst_project --mr-remove-source-branch"
opts+=" --no-remove-source-branch --mr-src-branch --mr-src-project"
......
......@@ -526,6 +526,14 @@ C<.devscripts> value: B<SALSA_SKIP_FILE>
=back
=item B<--ci-config-path>
Configure configuration file path of GitLab CI. Default: empty. Example:
salsa update_safe --ci-config-path debian/.gitlab-ci.yml debian/devscripts
C<.devscripts> value: B<SALSA_CI_CONFIG_PATH>
=item B<--desc> B<--no-desc>
Configure repo description using pattern given in B<desc-pattern>
......
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