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

Make config externally settable without environment variables. #71

Merged
merged 1 commit into from
Jul 23, 2021

Conversation

rgeyer
Copy link
Contributor

@rgeyer rgeyer commented Jul 22, 2021

This PR refactors the config struct. Previously, the config struct exported external state such as the list of repositories, organisations, and users, as well as values used for the API token.

However, the config struct did not export the "magic funcs" which are applied to concatenate all of the various target URLs, or which allow one to use an APIToken string, or a file containing an APIToken string.

This PR makes it possible to properly set and pass along those values from an external consumer, like the Grafana Agent.

Copy link
Contributor

@Rucknar Rucknar left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for the contribution!

@Rucknar Rucknar merged commit 2d147e9 into githubexporter:master Jul 23, 2021
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