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

contributions: active approvers #3826

Open
dhiller opened this issue Dec 13, 2024 · 1 comment
Open

contributions: active approvers #3826

dhiller opened this issue Dec 13, 2024 · 1 comment
Assignees

Comments

@dhiller
Copy link
Contributor

dhiller commented Dec 13, 2024

use case: active approvers in repository

Goal: improve our approver response rate

  • list everyone who /approved a PR in a period (say 3 months)
  • count
    • how many PRs they approved,
    • how many they /holded, and
    • how many comments they produced.

/assign

@dhiller
Copy link
Contributor Author

dhiller commented Dec 13, 2024

Base GraphQL query:

query reviews($org: String!, $repo: String!) {
  organization(login: $org) {
    repository(name: $repo) {
      pullRequests(first: 100, orderBy:{field: CREATED_AT, direction: DESC}) {
        totalCount
        nodes {
          createdAt
          author {
            login
          }
          title
          url
          state
          reviews(first: 50, states: [APPROVED, CHANGES_REQUESTED, COMMENTED]) {
            totalCount
            nodes {
              createdAt
              author {
                login
              }
              state
              url
              body
            }
          }
          comments(first: 100, orderBy: {field: UPDATED_AT, direction: DESC}) {
            totalCount
            nodes {
              createdAt
              author {
                login
              }
              body
              url
            }
          }
        }
      }
    }
  }
}

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

No branches or pull requests

1 participant