Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to signoff commits since v4 #904

Open
geemanjs opened this issue Dec 11, 2023 · 2 comments
Open

Unable to signoff commits since v4 #904

geemanjs opened this issue Dec 11, 2023 · 2 comments

Comments

@geemanjs
Copy link

geemanjs commented Dec 11, 2023

TL;DR

As per the title - It appears as if though the interface between release-please-action and release-please itself results in the signoff property being ignored.

Expected behavior

When migrating from v3 -> v4
Add the signoff key to my release-please-config.json file
Release please continues to signoff commits

Observed behavior

No commit signing appears to be happening

Action YAML

Happy to share this but it's mostly irrelevant. Heres the original release-please config after renovate updated us to v4 (we got some warning logs in the release-please task about unrecognised properties):

      - name: Release please
        uses: google-github-actions/release-please-action@v4
        id: release
        with:
          token: ${{ secrets.RP_TOKEN}}
          command: manifest
          monorepo-tags: true
          signoff: "Obfuscated <obfuscated@obfuscated.com>"

Heres the two keys I added to the release-please-config.json as per the migration recommendations

  "signoff": "Obfuscated <obfuscated@obfuscated.com>",
  "include-component-in-tag": true,

And heres the release-please yaml post actioning the migration recommendations

      - name: Release please
        uses: google-github-actions/release-please-action@v4
        id: release
        with:
          token: ${{ secrets.RP_TOKEN}}

Log output

No response

Additional information

Having done some digging..

The Manifest constructor expects the signoff property to be in manifestOptions (the 5th argument to the constructor)
https://github.com/googleapis/release-please/blob/main/src/manifest.ts#L356

When fromManifest is called it sets the 5th argument of the Manifest constructor to the following:

{
  manifestPath: manifestFile,
  ...manifestOptions,
  ...manifestOptionOverrides,
}

manifestOptionOverrides is only passed in by release-please-action in certain circumstances
manifestOptions comes from the parseConfig function in release-please

The parseConfig function does not extract the signoff property into the options:
https://github.com/googleapis/release-please/blob/main/src/manifest.ts#L1392-L1406

This might need to be an improvement in the release-please project but thought i'd raise it here as it has meant our upgrade to v4 has been unsuccessful.

@jensdrenhaus
Copy link

According to the linked issue and PR, the bug is fixed in recent release-please version.
Running my workflow with release-please-action@v4 it prints in the logs Running release-please version: 16.12.0

However, the commit in the release-pr is still not signed of in my repo.

Action YAML

name: Release

on:
  push:
    branches:
      - main
  workflow_dispatch:

permissions:
  contents: write
  pull-requests: write

jobs:
  release-please:
    name: Maintain Upcoming Release
    runs-on: ubuntu-latest
    steps:
      - uses: googleapis/release-please-action@v4
        id: release
        with:
          token: ${{ secrets.RELEASE_PLEASE_TOKEN }}
          config-file: release-please-config.json
          manifest-file: .release-please-manifest.json

release-please-config.json:

{
    "release-type": "go",
    "bump-minor-pre-major": true,
    "pull-request-title-pattern": "chore: release ${version}",
    "include-component-in-tag": false,
    "include-v-in-tag": true,
    "signoff": "Jens Drenhaus <jens.drenhaus@blindspot.software>",
    "changelog-sections": [
        {
            "type": "feat",
            "section": "Features"
        },
        {
            "type": "fix",
            "section": "Bug Fixes"
        },
        {
            "type": "docs",
            "section": "Documentation"
        },
        {
            "type": "refactor",
            "section": "Other Work"
        },
        {
            "type": "test",
            "section": "Other Work"
        },
        {
            "type": "build",
            "section": "Other Work"
        },
        {
            "type": "ci",
            "section": "CI",
            "hidden": true
        },
        {
            "type": "chore",
            "section": "Chore",
            "hidden": true
        },
        {
            "type": "revert",
            "section": "Revert",
            "hidden": true
        }
    ],
    "packages": {
        ".": {}
    }
}

@jensdrenhaus
Copy link

@geemanjs do you still encounter the problem, too?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants