backstage / community-plugins

Community plugins for Backstage

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

πŸ› Github Issues: Does not allow usage of multiple github hosts

Zaperex opened this issue Β· 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?

  • 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

Looking for contributions for this one, please!