You must configure either one of those with a non-empty array. Do you mean what happens if you specify orgs
to be non-empty and repos
to be empty, or orgs
to be empty and repos
to be non-empty?
Well, I’m trying to understand how the app_auth
method works with regard to the plugin.
I am using app_auth
, which already configures the org that is getting accessed, so I’m wondering if I have to redundantly specify the org at the higher config level.
This is what I have roughly:
kind: source
spec:
name: github
path: cloudquery/github
registry: cloudquery
version: "v7.7.1"
destinations: ["postgresql"]
spec:
app_auth:
- org: {{ organization }}
private_key_path: "${PRIVATE_KEY_PATH}"
app_id: "${APP_ID}"
installation_id: {{ installation_id }}
orgs: [??]
enterprise:
base_url: ...
upload_url: ...
tables:
- "*"
Where I’m generating that via Jinja template to provision the organization and installation_id.
Ah, got it.
Based on the validation in the code, I think you’d have to.
GitHub Link
Otherwise, it will fail.
We can look into populating that array, as I think there should be a 1-1 mapping between an app installation and access to the org.
Do you mind opening a feature request for it in GitHub Issues?
We’d have to test it a bit to ensure we’re not missing any edge cases.
Sounds good.
Yeah, I think there’s a 1-1 mapping, as you said, so the spec is redundant.