community-plugins icon indicating copy to clipboard operation
community-plugins copied to clipboard

🐛 Github Issues: Does not allow usage of multiple github hosts

Open Zaperex opened this issue 1 year ago • 1 comments

Plugin Name

github-issues

📜 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. image

👟 Reproduction steps

  1. Create a github repo with issues and a github app with permissions to view issues on that repository (make it on github.com)
  2. Install the github issues plugin
  3. 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:
  1. Ingest a component with a github slug pointing to the newly created github repo
  2. Navigate to the tab containing the issues component
  3. Observe error as it tries to query the github.company.com host instead of the expected github.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?

  • [X] I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

Are you willing to submit PR?

No, I don't have time to work on this right now

Zaperex avatar Jun 17 '24 17:06 Zaperex

Looking for contributions for this one, please!

awanlin avatar Jun 18 '24 14:06 awanlin

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Aug 31 '24 00:08 github-actions[bot]