googleapis / release-please-action

automated releases based on conventional commits
Apache License 2.0
1.64k stars 207 forks source link

Unable to signoff commits since v4 #904

Open geemanjs opened 9 months ago

geemanjs commented 9 months ago

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.