Skip to content

feat(plugins/scaffolder-backend-module-github): add branch/tag comparison action as github:commits:compare#33939

Open
22367rh wants to merge 16 commits intobackstage:masterfrom
22367rh:plugins-scaffolder-backend-module-github-signed
Open

feat(plugins/scaffolder-backend-module-github): add branch/tag comparison action as github:commits:compare#33939
22367rh wants to merge 16 commits intobackstage:masterfrom
22367rh:plugins-scaffolder-backend-module-github-signed

Conversation

@22367rh
Copy link
Copy Markdown

@22367rh 22367rh commented Apr 16, 2026

This PR adds branch/tag comparison functionality to the Backend Scaffold for Github & exposes it as github:commits:compare

This uses the octokit's rest.repos.compareCommitsWithBasehead action & returns a simplified array of commits that can be used in templates.

The return array of objects structure is as below:

property type description example
sha string The SHA of the commit a2dcbf9
commitDate string The date of the commit 2026-04-15T10:15:00Z
commitMessage string The first line of the commit message
pullRequestNumber number The pull request number associated with the commit, if any 33939
authorName string The name of the commit author Robin Hilton
authorEmail string The email of the commit author 22367rh@gmail.com

✔️ Checklist

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

@22367rh 22367rh requested a review from a team as a code owner April 16, 2026 08:36
Copilot AI review requested due to automatic review settings April 16, 2026 08:36
@22367rh 22367rh requested a review from a team as a code owner April 16, 2026 08:36
@github-actions github-actions Bot added the area:scaffolder Everything and all things related to the scaffolder project area label Apr 16, 2026
@backstage-goalie
Copy link
Copy Markdown
Contributor

backstage-goalie Bot commented Apr 16, 2026

Important

This PR includes changes that affect public-facing API. Please ensure you are adding/updating documentation for new features or behavior.

Changed Packages

Package Name Package Path Changeset Bump Current Version
@backstage/plugin-scaffolder-backend-module-github plugins/scaffolder-backend-module-github minor v0.9.9-next.0

@backstage-goalie backstage-goalie Bot added size:medium Medium-sized pull requests receive no change in priority for reviews. waiting-for:review The PR needs a review and will be visible in the review queue unless already assigned an owner. labels Apr 16, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a new GitHub scaffolder backend action (github:commits:compare) that compares two refs (SHA/branch/tag) using Octokit’s compare API and returns a simplified list of commits for template consumption.

Changes:

  • Register a new scaffolder action github:commits:compare in the GitHub scaffolder backend module.
  • Implement the action using rest.repos.compareCommitsWithBasehead, including dry-run output and examples.
  • Add a changeset and a basic (dry-run) unit test.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
plugins/scaffolder-backend-module-github/src/module.ts Registers the new action in the scaffolder backend module.
plugins/scaffolder-backend-module-github/src/actions/index.ts Exports the new action creator.
plugins/scaffolder-backend-module-github/src/actions/githubCommitsCompare.ts Implements github:commits:compare action (schema, Octokit compare call, mapping).
plugins/scaffolder-backend-module-github/src/actions/githubCommitsCompare.test.ts Adds unit test coverage (currently only dry-run).
plugins/scaffolder-backend-module-github/src/actions/githubCommitsCompare.examples.ts Adds scaffolder YAML example for the new action.
.changeset/shaky-emus-divide.md Declares a minor release for the new action.

Comment thread plugins/scaffolder-backend-module-github/src/module.ts Outdated
Comment thread plugins/scaffolder-backend-module-github/src/actions/githubCommitsCompare.ts Outdated
Copilot AI review requested due to automatic review settings April 16, 2026 09:04
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Copilot AI review requested due to automatic review settings April 16, 2026 09:23
@22367rh 22367rh marked this pull request as draft April 16, 2026 09:23
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.

@22367rh 22367rh force-pushed the plugins-scaffolder-backend-module-github-signed branch from aaba918 to c8cd39c Compare April 17, 2026 07:07
@github-actions github-actions Bot added area:documentation Improvements or additions to documentation area:catalog Related to the Catalog Project Area area:auth area:techdocs Related to the TechDocs Project Area area:kubernetes Related to the Kubernetes Project Area - not deploying Backstage with k8s. area:permission Related to the Permission Project Area area:events Related to the Events Project Area area:home area:search labels Apr 17, 2026
@backstage-goalie backstage-goalie Bot added size:huge Huge pull requests receive a lower priority for reviews. and removed size:medium Medium-sized pull requests receive no change in priority for reviews. labels Apr 17, 2026
@22367rh 22367rh force-pushed the plugins-scaffolder-backend-module-github-signed branch from c8cd39c to 976f83f Compare April 17, 2026 07:13
@github-actions github-actions Bot removed the area:documentation Improvements or additions to documentation label Apr 17, 2026
22367rh added 8 commits April 18, 2026 20:13
…lable.

Signed-off-by: Robin Hilton <22367rh@gmail.com>
… as suggested by the CI failure

Signed-off-by: Robin Hilton <22367rh@gmail.com>
Signed-off-by: Robin Hilton <22367rh@gmail.com>
Signed-off-by: Robin Hilton <22367rh@gmail.com>
Signed-off-by: Robin Hilton <22367rh@gmail.com>
…n in question

Signed-off-by: Robin Hilton <22367rh@gmail.com>
Signed-off-by: Robin Hilton <22367rh@gmail.com>
Signed-off-by: Robin Hilton <22367rh@gmail.com>
@22367rh 22367rh force-pushed the plugins-scaffolder-backend-module-github-signed branch from ad02be1 to 52ed7c8 Compare April 18, 2026 09:14
@22367rh 22367rh marked this pull request as draft April 18, 2026 09:16
22367rh added 3 commits April 20, 2026 07:31
…ause of it.

Signed-off-by: Robin Hilton <22367rh@gmail.com>
Signed-off-by: Robin Hilton <22367rh@gmail.com>
Signed-off-by: Robin Hilton <22367rh@gmail.com>
@22367rh 22367rh marked this pull request as ready for review April 19, 2026 20:06
@22367rh 22367rh requested a review from a team as a code owner April 19, 2026 20:06
Copilot AI review requested due to automatic review settings April 19, 2026 20:06
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 8 out of 9 changed files in this pull request and generated 4 comments.

Comment thread .github/workflows/ci.yml Outdated
Signed-off-by: Robin Hilton <22367rh@gmail.com>
22367rh added a commit to 22367rh/community-plugins that referenced this pull request Apr 20, 2026
…ith the output of backstage/backstage#33939

Signed-off-by: Robin Hilton <22367rh@gmail.com>
Copilot AI review requested due to automatic review settings April 21, 2026 19:52
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 9 out of 11 changed files in this pull request and generated 3 comments.

Comment thread .github/workflows/ci.yml Outdated
Comment thread plugins/scaffolder-backend-module-github/package.json
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Robin Hilton <22367rh@gmail.com>
Copilot AI review requested due to automatic review settings April 22, 2026 00:43
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

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

Labels

area:scaffolder Everything and all things related to the scaffolder project area size:medium Medium-sized pull requests receive no change in priority for reviews. waiting-for:review The PR needs a review and will be visible in the review queue unless already assigned an owner.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants