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

Add env var for some configs #31

Merged
merged 2 commits into from
Feb 25, 2021

Conversation

thspinto
Copy link
Contributor

☕ Purpose

Allow some constants to be configured as environment variables.

Included

  • github_host
  • default_organization_repository
  • app_route

Not included

  • config_keys: didn't include this configuration because it looks like it is tightly coupled to the code.

🔍 Use cases

I'd like to change the default_organization_repository a non public repo.

@SvanBoxel SvanBoxel self-requested a review February 24, 2021 19:17
Copy link
Owner

@SvanBoxel SvanBoxel left a comment

Choose a reason for hiding this comment

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

I'd like to change the default_organization_repository a non public repo.

Technically you can already do this with the workflows_repository setting. Isn't this sufficient?

@@ -139,6 +139,19 @@ The following inputs should be provided for every organization workflow.
The complete event generated in the repository that triggered the workflow is available at `${{ github.event.client_payload.event.<event_field_path> }}`.
Checkout [Github's docs](https://docs.github.com/en/developers/webhooks-and-events/webhook-events-and-payloads#push) to see the information available in the event.

## Backend Configuration
Copy link
Owner

@SvanBoxel SvanBoxel Feb 24, 2021

Choose a reason for hiding this comment

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

This is great! Could you add a few sentences explaining users that this part is only relevant when you want to host this app yourself?

@thspinto
Copy link
Contributor Author

thspinto commented Feb 25, 2021

Technically you can already do this with the workflows_repository setting. Isn't this sufficient?

I might be mistaken, but without this change the organization-workflows-settings.yml has to be in the .github repository right?
In my case this repo is public because of the PR templates. It's not a huge issue, but I'd rather not expose the private repos in the workflows_repository and exclude settings.

Copy link
Owner

@SvanBoxel SvanBoxel left a comment

Choose a reason for hiding this comment

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

🙇🏽 Amazing work.

@SvanBoxel SvanBoxel merged commit 7329883 into SvanBoxel:main Feb 25, 2021
@thspinto thspinto deleted the configurable-constants branch February 26, 2021 13:15
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