Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

The publish:gerrit:review action is not working as expected and failing with the errorΒ #34901

Copy link
Copy link

Description

@Prasanna505
Issue body actions

πŸ“œ Issue Labels

  • Please familiarize yourself with the issue labels used in this project: LABELS.md

πŸ”Ž Search Terms

"Scaffolder templates", "Gerrit"

πŸ—ƒοΈ Project Area

Software Templates

πŸ”— External Integration

Gerrit

πŸ“ Description & Context

I am trying to use publish:gerrit:review action provided by backstage to raise a review request in Gerrit. But when running this action, getting this below error:

2026-07-20T08:11:29.773Z Error: Could not find HEAD. {data={"what":"HEAD"}}
17
at Git.fetch (C:\Users\xyz\node_modules@backstage\plugin-scaffolder-backend-module-gerrit\node_modules@backstage\plugin-scaffolder-node\src\scm\git.ts:237:15)
18
at async Object.commitAndPushRepo (C:\Users\xyz@backstage\plugin-scaffolder-backend-module-gerrit\node_modules@backstage\plugin-scaffolder-node\src\actions\gitHelpers.ts:113:3)
19
at async Object.handler (C:\Users\xyz\node_modules@backstage\plugin-scaffolder-backend-module-gerrit\src\actions\gerritReview.ts:155:7)
20
at async NunjucksWorkflowRunner.executeStep (C:\Users\xyz\node_modules@backstage\plugin-scaffolder-backend\src\scaffolder\tasks\NunjucksWorkflowRunner.ts:534:9)
21
at async NunjucksWorkflowRunner.execute (C:\Users\xyz\node_modules@backstage\plugin-scaffolder-backend\src\scaffolder\tasks\NunjucksWorkflowRunner.ts:685:9)
22
at async TaskWorker.runOneTask (C:\Users\xyz\node_modules@backstage\plugin-scaffolder-backend\src\scaffolder\tasks\TaskWorker.ts:224:26)
23
at async run(C:\Users\xyz\node_modules\p-queue\dist\index.js:163:29)

I am trying to fetch a gerrit repo, do some delete operations and then push it as a review to another gerrit repo. I am not getting what the problem is!! Am I doing something wrong?

Template.yaml for reference:

  • id: fetch-gerrit
    name: Fetching Template from Gerrit Skeleton
    action: fetch:template
    input:
    url: http://127.0.0.1:8080/my-gerrit-app-new/+/refs/heads/main

  • id: publish-gerrit-review
    name: Submitting to Gerrit for Review
    action: publish:gerrit:review
    input:
    repoUrl: 127.0.0.1:8080?repo=a/${{ parameters.repoName }}
    branch: main
    gitCommitMessage: "For review: Commit from IDP Scaffolder"

πŸ‘ Expected Behavior

I expect the action to work properly without any error.

πŸ“¦ Reproduction Repo

No response

πŸ₯Ύ Reproduction steps

No response

Have you read the Code of Conduct?

Are you willing to submit PR?

Undecided

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.