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?

  • Automatically copy pushed files from one GitHub repository to another
  • Switching Git workflow from merge to rebase: how to clean up a merge commit history?
  • How to update forked repo as dependency during npm install?
  • Jenkins Build Using Git with Deploy Key
  • OSX: git: remote: Permission to user/repo denied to otheruser
  • how to properly register a github fork with Bower
  • Meaning of Github Ahead/Behind Metrics
  • BigQuery: When is GHTorrent refreshed and how to get up to date information?
  • git can't remember password
  • GIT 1.9 - remote: error: 'receive.denyCurrentBranch'
  • Is “git reset --hard” the same as “git reset --hard HEAD”?
  • How to un-approve github review after new commits automatically
  • 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.