Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

swap out implementation of update stats that better reflects activity #1684

Merged
merged 11 commits into from
Nov 11, 2019

Conversation

shiftkey
Copy link
Member

@shiftkey shiftkey commented Nov 11, 2019

Resolves #1682

This PR pulls in the newer implementation of locating a label using the GitHub API from up-for-grabs/tooling#11.

The goal with this change:

  • make it reusable in different situations
  • use a more opinionated check for "last updated" (based on label activity, not repository activity)

You can read more about the changes in that PR, but the key change is what we're querying for in the GraphQL API:

query($owner: String!, $name: String!, $label: String!) {
  repository(owner: $owner, name: $name) {
    label(name: $label) {
      name
      url
      issues(states: OPEN, first: 1, orderBy: {field: UPDATED_AT, direction: DESC}) {
        totalCount
        nodes {
          number
          updatedAt
        }
      }
    }
  }
}

By sorting the open issues by "last updated" and descending we can quickly see when any issue with the label was last active. There might be an even more accurate field for this (issue comments?) but for now this feels more accurate than repository's "last updated" field.

If there are no open issues to track in the project, the "last updated" field is not included in the data file, and we should ensure the client-side JS handles this case.

The other benefit of this change is that I can push additional information as part of the query that we didn't have before - in particular the URL to the label - and cleanup some projects that were out of sync. Those are listed in bd4d40e and this will resolve #1682.

  • test deploy URL
  • verify client-side rendering handles changes to schema
  • verify noscript mode handles changes to schema (if required)

@shiftkey shiftkey merged commit 4ed53b5 into gh-pages Nov 11, 2019
@shiftkey shiftkey deleted the swap-out-old-implementation-of-update-stats branch November 11, 2019 21:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

review projects that have been renamed or moved
1 participant