npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@stefank13/backstage-plugin-release-notes

v0.1.0

Published

## Overview

Downloads

1

Readme

Release Notes plugin for Backstage

Overview

The Release Notes plugin is a frontend plugin that offers the following 2 functionalities:

  • Shows all your releases for a component.
  • Shows the releases of your Backstage instance on the homepage.

NOTE: This plugin currently only works for GitLab (Support for GitHub will be added in the future).

Example of releases for a component:

Release Notes

Example of the releases of your Backstage instance on the homepage:

Release Notes

Installation Steps

  1. Add the plugin to you frontend app by running the following command from your Backstage root directory:
yarn --cwd packages/app add @stefank13/backstage-plugin-release-notes
  1. In the app-config.yaml file in the Backstage root directory, add the new proxy config:
proxy:
  '/gitlab':
    target: 'https://gitlab.com/api/v4'
    allowedHeaders: ['x-total-pages']
    headers:
      Authorization: 'Bearer ${GITLAB_TOKEN}'
  1. Also in the app-config.yaml file in the Backstage root directory, add the exposed header to the backend cors config:
backend:
  cors:
    exposedHeaders: ['x-total-pages']
  1. Create a new group access token with the permission read_api (https://docs.gitlab.com/ee/user/group/settings/group_access_tokens) and provide it as GITLAB_TOKEN as env variable.

Enabling Release Notes for a component

  1. Import and add EntityReleaseNotesContent to packages/app/src/components/catalog/EntityPage.tsx for all the entity pages you want the Release Notes to be in:

    import { EntityReleaseNotesContent } from '@stefank13/backstage-plugin-release-notes';
    
    //...
    
    const serviceEntityPage = (
      <EntityLayout>
        //...
        <EntityLayout.Route path="/release-notes" title="Release Notes">
          <EntityReleaseNotesContent />
        </EntityLayout.Route>
        //...
      </EntityLayout>
    );
    
    const websiteEntityPage = (
      <EntityLayout>
        //...
        <EntityLayout.Route path="/release-notes" title="Release Notes">
          <EntityReleaseNotesContent />
        </EntityLayout.Route>
        //...
      </EntityLayout>
    );
    
    const defaultEntityPage = (
      <EntityLayout>
        //...
        <EntityLayout.Route path="/release-notes" title="Release Notes">
          <EntityReleaseNotesContent />
        </EntityLayout.Route>
        //...
      </EntityLayout>
    );
  2. Add the following annotation to the catalog-info.yaml for an entity you want to show the Release Notes for:

    metadata:
      annotations:
        gitlab.com/project-slug: 'project-slug' #group_name/project_name

Enabling Release Notes for your Backstage instance on the homepage

  1. Before you can add the Release Notes card for the homepage, make sure you have configured the homepage. You can read how to do that here.

  2. When the homepage is configured, it's time to enable the HomePageReleaseNotesCard, this component expects the following 2 props:

    • projectSlug: This is the slug of your backstage instance git project.
    • title: This is the title of the card.

    For example, if your Backstage instance is called Dev Central, the props can have the following values:

    • projectSlug: developer-portal/dev-central
    • title: Dev Central Releases
  3. Import and add HomePageReleaseNotesCard to packages/app/src/components/home/HomePage.tsx. The HomePageReleaseNotesCard e:

    import { HomePageReleaseNotesCard } from '@stefank13/backstage-plugin-release-notes';
    
    //...
    
    export const HomePage = () => {
      <SearchContextProvider>
        <Page themeId="home">
          //...
          <Grid item xs={12} md={6}>
            <HomePageReleaseNotesCard
              projectSlug="developer-portal/dev-central"
              title="Dev Central Releases"
            />
          </Grid>
          //...
        </Page>
      </SearchContextProvider>;
    };