mirror of
https://github.com/pesde-pkg/pesde.git
synced 2024-12-12 11:00:36 +00:00
fix: make github oauth client id optional
This commit is contained in:
parent
d2e04f49d0
commit
756b5c8257
3 changed files with 6 additions and 2 deletions
|
@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
- Correct `pesde.toml` inclusion message in `publish` command by @daimond113
|
- Correct `pesde.toml` inclusion message in `publish` command by @daimond113
|
||||||
- Allow writes to files when `link` is false in PackageFS::write_to by @daimond113
|
- Allow writes to files when `link` is false in PackageFS::write_to by @daimond113
|
||||||
- Handle missing revisions in AnyPackageIdentifier::from_str by @daimond113
|
- Handle missing revisions in AnyPackageIdentifier::from_str by @daimond113
|
||||||
|
- Make GitHub OAuth client ID config optional by @daimond113
|
||||||
|
|
||||||
## [0.5.0-rc.5] - 2024-10-12
|
## [0.5.0-rc.5] - 2024-10-12
|
||||||
### Added
|
### Added
|
||||||
|
|
|
@ -95,7 +95,9 @@ impl LoginCommand {
|
||||||
let config = source
|
let config = source
|
||||||
.config(project)
|
.config(project)
|
||||||
.context("failed to read index config")?;
|
.context("failed to read index config")?;
|
||||||
let client_id = config.github_oauth_client_id;
|
let Some(client_id) = config.github_oauth_client_id else {
|
||||||
|
anyhow::bail!("index not configured for Github oauth.");
|
||||||
|
};
|
||||||
|
|
||||||
let response = reqwest
|
let response = reqwest
|
||||||
.post(Url::parse_with_params(
|
.post(Url::parse_with_params(
|
||||||
|
|
|
@ -364,7 +364,8 @@ pub struct IndexConfig {
|
||||||
#[serde(default)]
|
#[serde(default)]
|
||||||
pub wally_allowed: bool,
|
pub wally_allowed: bool,
|
||||||
/// The OAuth client ID for GitHub
|
/// The OAuth client ID for GitHub
|
||||||
pub github_oauth_client_id: String,
|
#[serde(default)]
|
||||||
|
pub github_oauth_client_id: Option<String>,
|
||||||
/// The maximum size of an archive in bytes
|
/// The maximum size of an archive in bytes
|
||||||
#[serde(default = "default_archive_size")]
|
#[serde(default = "default_archive_size")]
|
||||||
pub max_archive_size: usize,
|
pub max_archive_size: usize,
|
||||||
|
|
Loading…
Reference in a new issue