Skip to content

Commit

Permalink
Merge pull request #99 from avsaase/add-update-builder-custom-url
Browse files Browse the repository at this point in the history
fix: add missing with_url() method in UpdateBuilder
  • Loading branch information
jaemk authored Dec 30, 2022
2 parents ab6d3d8 + dea1fce commit 99d542e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/backends/github.rs
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,14 @@ impl UpdateBuilder {
self
}

/// Set the optional github url, e.g. for a github enterprise installation.
/// The url should provide the path to your API endpoint and end without a trailing slash,
/// for example `https://api.github.com` or `https://github.mycorp.com/api/v3`
pub fn with_url(&mut self, url: &str) -> &mut Self {
self.custom_url = Some(url.to_owned());
self
}

/// Set the current app version, used to compare against the latest available version.
/// The `cargo_crate_version!` macro can be used to pull the version from your `Cargo.toml`
pub fn current_version(&mut self, ver: &str) -> &mut Self {
Expand Down

0 comments on commit 99d542e

Please sign in to comment.