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
Open
Conversation
Contributor
|
Important This PR includes changes that affect public-facing API. Please ensure you are adding/updating documentation for new features or behavior. Changed Packages
|
Contributor
There was a problem hiding this comment.
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:comparein 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. |
aaba918 to
c8cd39c
Compare
c8cd39c to
976f83f
Compare
…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>
ad02be1 to
52ed7c8
Compare
…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>
Signed-off-by: Robin Hilton <22367rh@gmail.com>
4 tasks
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>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Robin Hilton <22367rh@gmail.com>
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.
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:
✔️ Checklist
Signed-off-byline in the message. (more info)