Skip to content

Skip some features on private user profiles#5814

Merged
kidonng merged 7 commits into
mainfrom
private-profile
Jul 11, 2022
Merged

Skip some features on private user profiles#5814
kidonng merged 7 commits into
mainfrom
private-profile

Conversation

@kidonng
Copy link
Copy Markdown
Member

@kidonng kidonng commented Jul 11, 2022

Part of #5356 (do I even remember that)

First thing to know: query strings (e.g. sort=stargazers) have no effect on private profiles.

  • rgh-sponsor-button: I'm not sure if users in the program can make their profile private, but there probably won't be a sponsor button there
  • set-default-repositories-type-to-sources: relies on query strings, so it doesn't work for the repositories tab. There's no organization listed either.
  • show-user-top-repositories: relies on query strings; "popular repositories" element doesn't exist.
  • user-local-time: can't get their events/commits
  • user-profile-follower-badge: can't get their followers

Test URLs

https://github.com/Centril

Screenshot

N/A

Copy link
Copy Markdown
Member

@fregante fregante left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, but as I had suggested in #5222, I wonder if we should have a global “ignore errors on empty pages” instead of having manually exclude each feature.

In the runner, we’d have:

try {
  init()
  log()
} catch {
    if is empty page or private user {
      log(“feature disabled”) // only if feature logging is active
    } else {
      error()
    }
}

@fregante
Copy link
Copy Markdown
Member

This specifically: #5222 (comment)

@kidonng
Copy link
Copy Markdown
Member Author

kidonng commented Jul 11, 2022

Looks good, but as I had suggested in #5222, I wonder if we should have a global “ignore errors on empty pages” instead of having manually exclude each feature.

That would better be a catch-all solution, instead of replacing explicit excludes.

@kidonng kidonng merged commit d0491bd into main Jul 11, 2022
@kidonng kidonng deleted the private-profile branch July 11, 2022 18:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants