From 9f2975910ca904163831555aecd1c9189c17d3e8 Mon Sep 17 00:00:00 2001 From: Jordan Doyle Date: Sun, 13 Mar 2022 23:28:26 +0000 Subject: [PATCH] Don't query for the job using the admin key --- src/config.rs | 2 +- src/providers/gitlab.rs | 4 ++++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/config.rs b/src/config.rs index 915fa0a..5518d2d 100644 --- a/src/config.rs +++ a/src/config.rs @@ -1,8 +1,8 @@ #![allow(clippy::module_name_repetitions)] use clap::Parser; use serde::{de::DeserializeOwned, Deserialize}; -use std::{path::PathBuf, net::SocketAddr}; +use std::{net::SocketAddr, path::PathBuf}; use url::Url; #[derive(Parser)] diff --git a/src/providers/gitlab.rs b/src/providers/gitlab.rs index 3ed4a9c..a2c4b6b 100644 --- a/src/providers/gitlab.rs +++ a/src/providers/gitlab.rs @@ -47,7 +47,9 @@ if username == "gitlab-ci-token" { let res: GitlabJobResponse = handle_error( - self.client + // we're purposely not using `self.client` here as we don't + // want to use our admin token for this request + reqwest::Client::new() .get(self.base_url.join("job/")?) .header("JOB-TOKEN", password) .send() -- rgit 0.1.3