Verified Commit 6720d8e5 authored by Orhun Parmaksız's avatar Orhun Parmaksız
Browse files

Merge branch 'main' of ssh://gitlab.archlinux.org:222/archlinux/gluebuddy into ci/run_clippy

parents 886edfc8 11091ee1
Pipeline #15173 failed with stages
in 2 minutes and 16 seconds
......@@ -2,7 +2,7 @@
name = "gluebuddy"
version = "0.1.0"
authors = ["Levente Polyak <anthraxx@archlinux.org>", "Sven-Hendrik Haase <svenstaro@gmail.com>"]
edition = "2018"
edition = "2021"
license-file = "LICENSE"
repository = "https://gitlab.archlinux.org/archlinux/gluebuddy"
categories = ["command-line-utilities"]
......
......@@ -142,7 +142,7 @@ impl GitLabGlue {
let mut summary = PlanSummary::new(&label);
let members = self.get_group_members(&group.full_path).await?;
for member in &members {
if is_archlinux_bot(&member) {
if is_archlinux_bot(member) {
continue;
}
......@@ -199,7 +199,7 @@ impl GitLabGlue {
.await?;
for member in &members {
if is_archlinux_bot(&member) {
if is_archlinux_bot(member) {
continue;
}
......@@ -258,7 +258,7 @@ impl GitLabGlue {
for staff in state.staff() {
if !gitlab_group_member_names.contains(&staff.username)
&& self
.add_group_member(action, &staff, group, DEFAULT_ARCH_LINUX_GROUP_ACCESS_LEVEL)
.add_group_member(action, staff, group, DEFAULT_ARCH_LINUX_GROUP_ACCESS_LEVEL)
.await?
{
summary.add += 1;
......@@ -266,7 +266,7 @@ impl GitLabGlue {
}
for member in &archlinux_group_members {
if is_archlinux_bot(&member) {
if is_archlinux_bot(member) {
continue;
}
match state.staff_from_gitlab_id(member.id) {
......@@ -316,7 +316,7 @@ impl GitLabGlue {
for staff in state.staff() {
if !gitlab_group_member_names.contains(&staff.username)
&& self
.add_group_member(action, &staff, group, DEFAULT_STAFF_GROUP_ACCESS_LEVEL)
.add_group_member(action, staff, group, DEFAULT_STAFF_GROUP_ACCESS_LEVEL)
.await?
{
summary.add += 1;
......@@ -324,7 +324,7 @@ impl GitLabGlue {
}
for member in &archlinux_group_members {
if is_archlinux_bot(&member) {
if is_archlinux_bot(member) {
continue;
}
match state.staff_from_gitlab_id(member.id) {
......@@ -375,7 +375,7 @@ impl GitLabGlue {
&& self
.add_group_member(
action,
&staff,
staff,
devops_group,
DEVOPS_INFRASTRUCTURE_ACCESS_LEVEL,
)
......@@ -386,7 +386,7 @@ impl GitLabGlue {
}
for member in &group_members {
if is_archlinux_bot(&member) {
if is_archlinux_bot(member) {
continue;
}
match state.devops_from_gitlab_id(member.id) {
......@@ -511,7 +511,7 @@ impl GitLabGlue {
debug!("Adding user {} to GitLab group '{}'", user.username, group);
util::print_diff(
&"",
"",
util::format_gitlab_member_access(group, &user.username, access_level).as_str(),
)?;
match action {
......@@ -547,7 +547,7 @@ impl GitLabGlue {
util::access_level_from_u64(member.access_level),
)
.as_str(),
&"",
"",
)?;
match action {
Action::Apply => {
......@@ -663,7 +663,7 @@ impl GitLabGlue {
user.username, project
);
util::print_diff(
&"",
"",
util::format_gitlab_member_access(project, &user.username, access_level).as_str(),
)?;
match action {
......@@ -701,7 +701,7 @@ impl GitLabGlue {
util::access_level_from_u64(member.access_level),
)
.as_str(),
&"",
"",
)?;
match action {
Action::Apply => {
......
......@@ -116,8 +116,7 @@ impl Keycloak {
.await?;
let groups = all_groups
.iter()
.filter(|group| root_groups.contains(&group.name.as_ref().unwrap().as_ref()))
.collect::<Vec<_>>();
.filter(|group| root_groups.contains(&group.name.as_ref().unwrap().as_ref()));
let groups_members = groups.into_iter().flat_map(|group| {
let group_name = group.name.as_ref().unwrap();
......
......@@ -20,12 +20,9 @@ use tokio::sync::Mutex;
async fn run(args: Args) -> Result<()> {
/* Early exit for completions */
match args.command {
Command::Completions(completions) => {
if let Command::Completions(completions) = args.command {
args::gen_completions(&completions)?;
return Ok(());
}
_ => {}
}
let state = Arc::new(Mutex::new(State::default()));
......
......@@ -95,5 +95,5 @@ pub fn format_gitlab_project_settings(
}
pub fn format_separator() -> String {
"-".repeat(72).to_string()
"-".repeat(72)
}
Supports Markdown
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