Skip to content

Conversation

@khushboo9024
Copy link
Contributor

@khushboo9024 khushboo9024 commented Nov 28, 2025

This PR fixes the issue where github_my_repository table errors when using Fine-Grained PATs with organization as resource owner.

Problem
The table was failing with Error: github: Resource not accessible by personal access token when using Fine-Grained PATs. Additionally, interaction_ability and hooks columns caused GraphQL field errors.

Solution

  1. Fixed interaction_ability column:
    Modified appendRepoColumnIncludesWithQueryData() to exclude interactionAbility from GraphQL query when using Fine-Grained PATs Only applies to github_my_repository table

  2. Fixed hooks column:
    Created hydrateMyRepositoryHooksFromV3() function that skips hooks fetching for Fine-Grained PATs Only used by github_my_repository table (other tables use original function unchanged)

Changes

  • github/repo_utils.go: Added Fine-Grained PAT detection for interaction_ability
  • github/table_github_my_repository.go:
    • Uses appendRepoColumnIncludesWithQueryData() with QueryData
    • Overrides hooks column to use hydrateMyRepositoryHooksFromV3()

Impact
✅ github_my_repository now works with Fine-Grained PATs
✅ Other tables (github_repository, etc.) remain unchanged

Example query results

Results
Add example SQL query results here (please include the input queries as well)

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.

github_my_repository Table Erroring With Fine-Grained Personal Access Token

2 participants