Skip to content

Conversation

@gavinelder
Copy link

@gavinelder gavinelder commented Nov 19, 2025

Hey, I just made a Pull Request!

The following updates the cicd-statistics-module-github authentication flow to align with other backstage community plugins for example.

  • github-actions
  • github-deployments
  • github-issues

I noticed an issue where the actions statistics was failing to load until you first navigated to another Github Plugin such as github-actions which would then prompt you to authenticate with the correct scopes required for the action.

When looking to update the scope checking and using the existing github-actions code for reference I noticed that there was a major divergence in the relevant code and decided to align it to the existing github centric modules.

✔️ Checklist

  • A changeset describing the change and affected packages. (more info)
  • Added or updated documentation
  • Tests for new functionality and regression tests for bug fixes
  • Screenshots attached (for UI changes)
  • All your commits have a Signed-off-by line in the message. (more info)

@backstage-goalie
Copy link
Contributor

backstage-goalie bot commented Nov 19, 2025

Changed Packages

Package Name Package Path Changeset Bump Current Version
@backstage-community/plugin-cicd-statistics-module-github workspaces/cicd-statistics/plugins/cicd-statistics-module-github minor v0.9.1

@backstage-goalie
Copy link
Contributor

Thanks for the contribution!
All commits need to be DCO signed before they are reviewed. Please refer to the the DCO section in CONTRIBUTING.md or the DCO status for more info.

@gavinelder gavinelder force-pushed the ge/chore/align-github-module branch from acbfa60 to 6f8affc Compare November 19, 2025 18:08
@gavinelder gavinelder marked this pull request as ready for review November 19, 2025 18:25
@gavinelder gavinelder requested a review from a team as a code owner November 19, 2025 18:25
Copy link
Contributor

@awanlin awanlin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution @gavinelder, just left a few minor comments 👍

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's leave this one out of the changes. It's already likely out of date as we just merged a bunch of 1.45.x version bumps. It also keeps the subject of the PR focused. 👍

@@ -0,0 +1,33 @@
/*
* Copyright 2024 The Backstage Authors
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* Copyright 2024 The Backstage Authors
* Copyright 2025 The Backstage Authors

Seeing as this is a new file

* @packageDocumentation
*/

export { CicdStatisticsApiGithub, GITHUB_ACTIONS_ANNOTATION } from './api';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
export { CicdStatisticsApiGithub, GITHUB_ACTIONS_ANNOTATION } from './api';
export { CicdStatisticsApiGithub } from './api';

Not sure why we are exporting GITHUB_ACTIONS_ANNOTATION here, seems odd to do and it's already exported by the GitHub Actions plugin.

url: `https://${hostname}/`,
additionalScope: {
customScopes: {
github: ['repo'],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you confirm this will get us the same results as the current read_api?

'@backstage-community/plugin-cicd-statistics-module-github': minor
---

Updated Github Authentication methods to prompt for required scopes and refactored auth to align with community-plugin conventions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Updated Github Authentication methods to prompt for required scopes and refactored auth to align with community-plugin conventions
Updated Github Authentication methods to prompt for required scopes and refactored auth to align with Backstage GitHub plugin conventions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants