Fix issues for groups that are not created by Github Organization module#9706
Open
PadreSVK wants to merge 3 commits into
Open
Fix issues for groups that are not created by Github Organization module#9706PadreSVK wants to merge 3 commits into
PadreSVK wants to merge 3 commits into
Conversation
Contributor
Changed Packages
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes GitHub Issues card behavior for Group/User entities whose backstage.io/source-location / backstage.io/managed-by-location is missing or not a parseable URL, by no longer deriving the GitHub host from the owner entity’s location and instead letting the API resolve it from configured integrations.github.
Changes:
- Make hostname resolution non-throwing and allow host fallback to configured GitHub integrations for owner entities.
- Ensure repositories without a determinable host are not silently filtered out.
- Add a regression test for a
Groupentity with no annotations, plus documentation and a changeset entry.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| workspaces/github/plugins/github-issues/src/hooks/useGetIssuesByRepoFromGithub.ts | Avoid constraining host resolution for Group/User entities by their own catalog location. |
| workspaces/github/plugins/github-issues/src/hooks/useEntityGithubRepositories.ts | Make hostname parsing non-throwing and return undefined when host can’t be derived. |
| workspaces/github/plugins/github-issues/src/components/GithubIssues/GithubIssues.test.tsx | Add regression test for groups without annotations to ensure the card doesn’t crash. |
| workspaces/github/plugins/github-issues/src/api/githubIssuesApi.ts | Accept optional host selection and adjust repo filtering to keep repos with unknown host. |
| workspaces/github/plugins/github-issues/README.md | Document host resolution behavior for owner entities vs other kinds. |
| workspaces/github/.changeset/github-issues-group-host-resolution.md | Add patch changeset describing the crash fix and host resolution behavior change. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…m owned entities (same logic as Pull Request) Signed-off-by: Patrik Švikruha <patrik.svikruha.dev@gmail.com>
…based on Entity kind Signed-off-by: Patrik Švikruha <patrik.svikruha.dev@gmail.com>
…d improve URL parsing in getHostnameFromEntity Signed-off-by: Patrik Švikruha <patrik.svikruha.dev@gmail.com>
1910c5b to
05889f9
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hey, I just made a Pull Request!
PR replicate same logic from pull request for issues. This enable to see GH issues on group entities that are not created by catalog module github organization
✔️ Checklist
Signed-off-byline in the message. (more info)