Skip to content

Conversation

@cbullinger
Copy link
Collaborator

Includes all the fixes needed to get the copier app to work in the monorepo:

  • Added GetRestClientForOrg() for org-specific authentication
  • Fixed GraphQL query to use node(id:) instead of repository(owner:)
  • Updated file content retrieval to use org-specific client
  • Removed the refs/heads/ prefix duplication

The workflow processor was creating UploadKey with BranchPath set to just
the branch name (e.g., 'main') instead of the full ref path (e.g.,
'refs/heads/main'). This caused GitHub API calls to fail with 404 errors
when trying to access the branch ref.

This fix ensures BranchPath is always set with the 'refs/heads/' prefix,
consistent with how it's used throughout the rest of the codebase.
- Add GetRestClientForOrg() to get installation-specific tokens
- Fix GraphQL query to use node(id:) instead of repository(owner:)
- Update RetrieveFileContentsWithConfigAndBranch to use org-specific client
- Remove refs/heads/ prefix duplication in workflow processor
- Fixes 404 errors when accessing repos in different orgs
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.

2 participants