Skip to content

Conversation

aszarama
Copy link
Contributor

Jira ticket: https://cortex1.atlassian.net/browse/CET-20674

The background is that we want to add support for scaffolder, which needs access to github (not api/graphql).

This PR just adds a validation for accept header, there's more headers than we need, but just in case something changes in the future.

This PR is breaking the contract, because it needs one additional variable "GITHUB", which is just a plain link to the github, for example "https://github.com".

@aszarama
Copy link
Contributor Author

aszarama commented Sep 12, 2025

Currently it will fail some tests. I'm not sure how we want to deal with these changes for scaffolder, is it gonna be mentioned only in the docs, or we want to make a change for all customers, but require them to add new variable.

@aszarama aszarama requested a review from shawnburke September 12, 2025 19:57
@shawnburke shawnburke closed this Sep 12, 2025
@shawnburke shawnburke reopened this Sep 12, 2025
@aszarama aszarama requested a review from shawnburke September 29, 2025 20:36
@aszarama
Copy link
Contributor Author

Hey @shawnburke, figured out how to deal with scaffolder. Turns out we just have to handle two requests to the github.

I was able to use it, to clone github repo and use it through workflows scaffolder action.

The only problem I have right now is that I don't know how should we approach github app accept file, any ideas?

@aszarama
Copy link
Contributor Author

aszarama commented Oct 6, 2025

Hey @shawnburke, figured out how to deal with scaffolder. Turns out we just have to handle two requests to the github.

I was able to use it, to clone github repo and use it through workflows scaffolder action.

The only problem I have right now is that I don't know how should we approach github app accept file, any ideas?

Scratch that, I've added custom header to all scaffolder requests, so it's easy to filter against.

It's all tested, working without a problem.

I've put my notes on how I wanted to handle things in this PR here: https://github.com/cortexapps/brain-backend/pull/11998

Any thoughts @shawnburke? Can we go live with this approach? (after adding app config too)

Copy link
Collaborator

@shawnburke shawnburke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please rebase on top of #57 and use the defaults so we don't break existing github axon users.

@aszarama
Copy link
Contributor Author

aszarama commented Oct 7, 2025

I've cleaned up this PR. Here's what we want users to set:

So for github token auth, there's GITHUB env, and for github app we have to set GITHUB and GITHUB_TOKEN.

Copy link
Collaborator

@shawnburke shawnburke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good!

@aszarama aszarama merged commit 332c69b into main Oct 7, 2025
10 checks passed
@aszarama aszarama deleted the CET-20674 branch October 7, 2025 20:35
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