BigQuery GitHub data: How to handle repo name changes?

My goal is to track the total number of stars of my repo. However, its repo.name changed over time. How to achieve this with the githubarchive dataset?

  • git: check out a tag, modify something, then tag it again
  • Commit message hook on github
  • GitHub Pull Requests Between Branches
  • Push a branch of a git repo to a new remote (github), hiding its history
  • Git - Moving Pushed Commits to a Different Branch
  • How do I host my website on github
  • Can't remove file from git commit
  • How can I push to one url and pull from another using one remote?
  • How to use GitHub Repo using JitPack.io in Maven
  • Git pull request says “This branch has conflicts that must be resolved”
  • How to integrate Sublime Text with GitHub?
  • Un-ignore all files in global .gitignore
  • One Solution collect form web for “BigQuery GitHub data: How to handle repo name changes?”

    (related to https://stackoverflow.com/a/42930963/132438)

    GitHub project names go through changes, so instead of querying by name it’s safer to query by id. You could look for a project id in a separate query, or do it altogether in a query like this:

    SELECT 
      COUNT(*) naive_count,
      COUNT(DISTINCT actor.id) unique_by_actor_id, 
      COUNT(DISTINCT actor.login) unique_by_actor_login 
    FROM `githubarchive.month.*` 
    WHERE repo.id = (
      SELECT repo.id 
      FROM `githubarchive.month.201702` 
      WHERE repo.name='bazelbuild/bazel' 
      LIMIT 1)
    AND type = "WatchEvent"
    
    Git Baby is a git and github fan, let's start git clone.