Fix spelling; Github -> GitHub (#1416)

This commit is contained in:
John Bampton 2024-04-26 06:44:24 +10:00 committed by GitHub
parent 25a3eb1a3a
commit 7be088bbfc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 16 additions and 16 deletions

View file

@ -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 {

View file

@ -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.",
));
}

View file

@ -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.
///
@ -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;

View file

@ -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>"#;

View file

@ -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>"#;

View file

@ -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,

View file

@ -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),
@ -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
@ -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,

View file

@ -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
@ -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 {
@ -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