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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set GH_APP similar to other environment vars in start-nginx.sh #2711

Open
imnotjames opened this issue Mar 18, 2024 · 2 comments 路 May be fixed by #2712
Open

Set GH_APP similar to other environment vars in start-nginx.sh #2711

imnotjames opened this issue Mar 18, 2024 · 2 comments 路 May be fixed by #2712
Labels
bug Something isn't working

Comments

@imnotjames
Copy link

馃摚 Feedback / 馃悰 Bugs

When setting up the codecov frontend, GH_APP isn't easy to specify. This means that users with non-codecov github apps won't be able to add new organizations.

codecov/self-hosted#22

Either we can do the string replace patching in start-nginx somehow (A little tricker since codecov as a string is pretty ubiquitous) or find a way to inject window.configEnv during start-nginx.

Is there a preferable path for anyone else?

@imnotjames
Copy link
Author

imnotjames commented Mar 18, 2024

To do the sed patching it'd be something like..

GITHUB_APP_BASE=${CODECOV_GITHUB_APP_SEARCH:=codecov}
if [ -n "${CODECOV_GITHUB_APP}" ]; then
  echo "Replacing Github App ${GITHUB_APP_BASE} for ${CODECOV_GITHUB_APP}"
  sed -i "s/GH_APP:\"${GH_APP_BASE}\"/GH_APP:\"${CODECOV_GITHUB_APP}\"/g" /var/www/app/gazebo/static/js/main.*
fi

I can open a PR but I'm not sure if that's the desired path forward.

@imnotjames
Copy link
Author

To make things faster I'll just open with that. After a bit of testing it seems to work fine and shouldn't have too many side effects. (As much as I think injecting window.configEnv is a better feature)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants