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

commitMode does not work anymore #1356

Closed
KonradHoeffner opened this issue Aug 6, 2024 · 4 comments
Closed

commitMode does not work anymore #1356

KonradHoeffner opened this issue Aug 6, 2024 · 4 comments

Comments

@KonradHoeffner
Copy link
Contributor

KonradHoeffner commented Aug 6, 2024

Since upgrading this action from v4 to v5, commitMode does not work anymore.

Excerpt from our .github/workflows/release.yml:

    steps:
      - name: Build Changelog
        id: build-changelog
        uses: mikepenz/release-changelog-builder-action@v5
        with:
          commitMode: true
          configurationJson: |
            {
              "pr_template": "- #{{TITLE}}",
              "template": "#{{UNCATEGORIZED}}"
            }

This used to generate one bullet point for each commit but since the upgrade to v5 it only generates one for each PR.
Seeing db235a6, it seems like this got changed but not updated in README.md?

src/main.ts looks like commitMode should be picked up but it is not recognized:

Run mikepenz/release-changelog-builder-action@v5
  with:
    commitMode: true
    configurationJson: {
    "pr_template": "- #{{TITLE}}",
    "template": "#{{UNCATEGORIZED}}"
  }
  
    includeOpen: false
    ignorePreReleases: false
    failOnError: false
    fetchViaCommits: false
    fetchReviewers: false
    fetchReleaseInformation: false
    fetchReviews: false
    token: ***
    exportCache: false
    exportOnly: false
    platform: github
  env:
    NAME: rickview
    CARGO_TERM_COLOR: always
    CARGO_INCREMENTAL: 0
    RUSTFLAGS: -Dwarnings
📘 Reading input values
  ℹ️ Retrieved configuration via 'configurationJson'.
  ℹ️ Running in PR mode.
🔖 Resolve tags
  ℹ️ Found 34 (fetching max: 200) tags from the GitHub API for KonradHoeffner/rickview
  🔖 Resolved current tag (0.3.4) from the 'github.context.ref'
  🔖 Resolved previous tag (0.3.3) from the tags git API
🚀 Load data
  🚀 Load pull requests
  ℹ️ Comparing KonradHoeffner/rickview - '0.3.3...0.3.4'
  ℹ️ Found 4 commits from the GitHub API for KonradHoeffner/rickview
  ℹ️ Fetching PRs between dates 2024-07-15T13:54:11.000Z to 2024-08-05T13:37:17.000Z for KonradHoeffner/rickview
  ℹ️ Retrieved 4 release commits for KonradHoeffner/rickview
  ℹ️ Retrieved 10 PRs for KonradHoeffner/rickview in date range from API
  ℹ️ Retrieved 1 merged PRs for KonradHoeffner/rickview
📦 Build changelog
  ℹ️ Sorted all pull requests ascending: {"order":"ASC","on_property":"mergedAt"}
  ℹ️ Used 0 transformers to adjust message
  ✒️ Wrote messages for 1 pull requests
  ℹ️ Ordered all pull requests into 4 categories
  ✒️ Wrote 0 categorized pull requests down
  ✒️ Wrote 1 non categorized pull requests down
  ✒️ Wrote 0 ignored pull requests down
  ℹ️ Filled template
@KonradHoeffner
Copy link
Contributor Author

KonradHoeffner commented Aug 6, 2024

Could this line from src/main.ts be the culprit?

const mode = resolveMode(core.getInput('mode'), core.getInput('commitMode') === 'true')

It seems as if commitMode is compared to the string 'true' but as per documentation the boolean value true is given and then compared with the === operator. Or does the yaml library compare booleans to strings?

@mikepenz
Copy link
Owner

mikepenz commented Aug 6, 2024

Commit mode is deprecated and I'd advice to transition to the mode setting:
https://github.com/mikepenz/release-changelog-builder-action/blob/develop/action.yml#L45-L47

This was actually a bug and got fixed by: #1351

Will move forward tagging a new release. apologies

@mikepenz
Copy link
Owner

mikepenz commented Aug 6, 2024

v5 / v5.0.0-rc02 was released. This should work again as expected

@mikepenz mikepenz closed this as completed Aug 6, 2024
@KonradHoeffner
Copy link
Contributor Author

Thank you for the swift release and reply, I switched to mode: "COMMIT" and it works perfectly!

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