π Github Issues: Does not allow usage of multiple github hosts
Zaperex opened this issue Β· comments
Plugin Name
π Description
The github-issues plugin grabs the first github integrations it finds for all components (even ones that don't use those hosts). This prevents this plugin from being properly used when multiple github integration hosts are present.
π Expected behavior
It should grab the github integration corresponding to the correct host of the component with the github slug annotation. Perhaps a more verbose annotation indicating the host of the github instance can help with this?
π Actual Behavior with Screenshots
Grabs the very first github integration it finds, uses it and causes the issue fetch to fail.
π Reproduction steps
- Create a github repo with issues and a github app with permissions to view issues on that repository (make it on github.com)
- Install the github issues plugin
- Add at least 2 different github hosts in the github integrations (put the github.com host as the 2nd integration in the list)
integrations:
github:
- host: github.company.com
apiBaseUrl: https://github.company.com/api/v3
- host: github.com
apps:
- Ingest a component with a github slug pointing to the newly created github repo
- Navigate to the tab containing the issues component
- Observe error as it tries to query the
github.company.com
host instead of the expectedgithub.com
host
π Provide the context for the Bug.
This prevents the use of this plugin when multiple github integrations for different github instances are configured. Only the first github instance would be queried from for all components using this plugin
π Have you spent some time to check if this bug has been raised before?
- I checked and didn't find similar issue
π’ Have you read the Code of Conduct?
- I have read the Code of Conduct
Are you willing to submit PR?
No, I don't have time to work on this right now
Looking for contributions for this one, please!