Skip to content

Commit

Permalink
Fix spelling; Github -> GitHub (#1416)
Browse files Browse the repository at this point in the history
  • Loading branch information
jbampton authored Apr 25, 2024
1 parent 25a3eb1 commit 7be088b
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion lychee-bin/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ async fn run(opts: &LycheeOptions) -> Result<i32> {

if github_issues && opts.config.github_token.is_none() {
let mut handle = io::stderr();
color!(handle, YELLOW, "\u{1f4a1} There were issues with Github URLs. You could try setting a Github token and running lychee again.",)?;
color!(handle, YELLOW, "\u{1f4a1} There were issues with GitHub URLs. You could try setting a GitHub token and running lychee again.",)?;
}

if opts.config.cache {
Expand Down
2 changes: 1 addition & 1 deletion lychee-bin/tests/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ mod cli {
"✗ [404] https://github.com/mre/idiomatic-rust-doesnt-exist-man | Failed: Network error: Not Found"
))
.stderr(contains(
"There were issues with Github URLs. You could try setting a Github token and running lychee again.",
"There were issues with GitHub URLs. You could try setting a GitHub token and running lychee again.",
));
}

Expand Down
4 changes: 2 additions & 2 deletions lychee-lib/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ impl ClientBuilder {
/// - The reqwest client cannot be instantiated. This occurs if a TLS
/// backend cannot be initialized or the resolver fails to load the system
/// configuration. See [here].
/// - The Github client cannot be created. Since the implementation also
/// - The GitHub client cannot be created. Since the implementation also
/// uses reqwest under the hood, this errors in the same circumstances as
/// the last one.
///
Expand Down Expand Up @@ -604,7 +604,7 @@ impl Client {

if let Ok(github_uri) = GithubUri::try_from(uri) {
let status = self.check_github(github_uri).await;
// Only return Github status in case of success
// Only return GitHub status in case of success
// Otherwise return the original error, which has more information
if status.is_success() {
return status;
Expand Down
2 changes: 1 addition & 1 deletion lychee-lib/src/collector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ mod tests {
async fn test_relative_url_with_base_extracted_from_input() {
let contents = r#"<html>
<div class="row">
<a href="https://github.com/lycheeverse/lychee/">Github</a>
<a href="https://github.com/lycheeverse/lychee/">GitHub</a>
<a href="/about">About</a>
</div>
</html>"#;
Expand Down
2 changes: 1 addition & 1 deletion lychee-lib/src/extract/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ mod tests {

let contents = r#"<html>
<div class="row">
<a href="https://github.com/lycheeverse/lychee/">Github</a>
<a href="https://github.com/lycheeverse/lychee/">GitHub</a>
<a href="/about">About</a>
</div>
</html>"#;
Expand Down
2 changes: 1 addition & 1 deletion lychee-lib/src/retry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ impl RetryExt for ErrorKind {
// If the error is a `reqwest::Error`, delegate to that
if let Some(r) = self.reqwest_error() {
r.should_retry()
// Github errors sometimes wrap `reqwest` errors.
// GitHub errors sometimes wrap `reqwest` errors.
// In that case, delegate to the underlying error.
} else if let Some(octocrab::Error::Http {
source,
Expand Down
12 changes: 6 additions & 6 deletions lychee-lib/src/types/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ pub enum ErrorKind {
#[error("Error creating request client: {0}")]
BuildRequestClient(#[source] reqwest::Error),

/// Network error while using Github API
/// Network error while using GitHub API
#[error("Network error (GitHub client)")]
GithubRequest(#[from] octocrab::Error),

Expand All @@ -44,12 +44,12 @@ pub enum ErrorKind {
#[error("Attempted to interpret an invalid sequence of bytes as a string")]
Utf8(#[from] std::str::Utf8Error),

/// The Github client required for making requests cannot be created
#[error("Error creating Github client")]
/// The GitHub client required for making requests cannot be created
#[error("Error creating GitHub client")]
BuildGithubClient(#[source] octocrab::Error),

/// Invalid Github URL
#[error("Github URL is invalid: {0}")]
/// Invalid GitHub URL
#[error("GitHub URL is invalid: {0}")]
InvalidGithubUrl(String),

/// The input is empty and not accepted as a valid URL
Expand Down Expand Up @@ -102,7 +102,7 @@ pub enum ErrorKind {
#[error("UNIX glob pattern is invalid")]
InvalidGlobPattern(#[from] glob::PatternError),

/// The Github API could not be called because of a missing Github token.
/// The GitHub API could not be called because of a missing GitHub token.
#[error("GitHub token not specified. To check GitHub links reliably, use `--github-token` flag / `GITHUB_TOKEN` env var.")]
MissingGitHubToken,

Expand Down
6 changes: 3 additions & 3 deletions lychee-lib/src/types/uri/github.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ static GITHUB_API_EXCLUDED_ENDPOINTS: Lazy<HashSet<&'static str>> = Lazy::new(||
])
});

/// Uri path segments extracted from a Github URL
/// Uri path segments extracted from a GitHub URL
#[derive(PartialEq, Eq, PartialOrd, Ord, Debug)]
pub struct GithubUri {
/// Organization name
Expand All @@ -35,7 +35,7 @@ pub struct GithubUri {
}

impl GithubUri {
/// Create a new Github URI without an endpoint
/// Create a new GitHub URI without an endpoint
#[cfg(test)]
fn new<T: Into<String>>(owner: T, repo: T) -> Self {
GithubUri {
Expand Down Expand Up @@ -83,7 +83,7 @@ impl GithubUri {

if parts.len() < 2 {
// Not a valid org/repo pair.
// Note: We don't check for exactly 2 here, because the Github
// Note: We don't check for exactly 2 here, because the GitHub
// API doesn't handle checking individual files inside repos or
// paths like <github.com/org/repo/issues>, so we are more
// permissive and only check for repo existence. This is the
Expand Down

0 comments on commit 7be088b

Please sign in to comment.