How Tentacle Works
Tentacle’s core functionality revolves around automatically detecting and displaying links defined in your project’s catalog-info.yaml
file. This file is typically found in the root directory of your repository and is used to register entities in the Backstage software catalog.
When you install Tentacle and visit a GitHub repository, the extension scans the repository for the presence of a catalog-info.yaml file. If it’s found, Tentacle will parse the file and extract the defined links, including their titles, URLs, and optional icons.
Integrating with the GitHub UI
After identifying the links in the catalog-info.yaml file, Tentacle seamlessly integrates them into the GitHub user interface. Depending on the context, these links will be displayed in different areas of the GitHub experience:
- Repository View: In the repository overview page, Tentacle will add a new section that displays all the links defined in the
metadata.links
section of thecatalog-info.yaml
file. - Pull Request View: For pull requests, Tentacle will also surface the links defined in the
metadata.tentacle.pullRequestLinks
section of thecatalog-info.yaml
file.
This integration ensures that your team have easy access to relevant resources and information directly within the GitHub environment they’re already using every day.
Dynamic Link Rendering
Tentacle goes beyond just displaying static links. It also supports the use of dynamic variables that can be resolved based on the current context, such as the pull request or the repository.
For example, you can define a link that will take the user directly to a preview environment for the current pull request by using the $pullrequest.number
variable. Tentacle will automatically substitute this variable with the actual pull request number, creating a personalized link for each pull request.