question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error applying minor version label

See original GitHub issue

Got an error when the workflow had a minor label applied

Screen Shot 2022-01-13 at 12 13 55 PM

name: Draft Release
on:
    push:
        branches:
            - main
        pull_request:
            types: [opened, reopened, synchronize]

jobs:
    update_release_draft:
        runs-on: ubuntu-latest
        steps:
            - uses: release-drafter/release-drafter@v5
              with:
                  config-name: release-template.yml
              #   disable-autolabeler: true
              env:
                  GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

name-template: '$RESOLVED_VERSION'
tag-template: '$RESOLVED_VERSION'
categories:
    - title: "🚀 What's new"
      labels:
          - 'PR: New'
    - title: '🏋️ Improvements'
      labels:
          - 'PR: Improvement'
    - title: '🐛 Bug Fixes'
      labels:
          - 'PR: Fix'
exclude-labels:
    - 'PR: No Changelog'
change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.
version-resolver:
    minor:
        labels:
            - 'minor'
    patch:
        labels:
            - 'patch'
    default: patch
template: |
    ## Release Changes

    $CHANGES

I have a general question to. If we add a minor label to multiple PRs will it continuously bump the version number? Or is it only one bump per release? Thanks

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:17 (10 by maintainers)

github_iconTop GitHub Comments

2reactions
darrentorpeycommented, Jan 13, 2022

Just want to drop a quick note here to say that our repos that use release-drafter/release-drafter@v5 have started to get what seems to be the same error:

  stack: 'AggregateError: \n' +
    "    TypeError: Cannot read properties of undefined (reading 'labels')\n" +
    '        at /home/runner/work/_actions/release-drafter/release-drafter/v5/dist/index.js:133627:41\n' +
    '        at Array.flatMap (<anonymous>)\n' +
    '        at resolveVersionKeyIncrement (/home/runner/work/_actions/release-drafter/release-drafter/v5/dist/index.js:133626:8)\n' +
    '        at generateReleaseInfo (/home/runner/work/_actions/release-drafter/release-drafter/v5/dist/index.js:133678:5)\n' +
    '        at drafter (/home/runner/work/_actions/release-drafter/release-drafter/v5/dist/index.js:132984:25)\n' +
    '        at async Promise.all (index 0)\n' +
    '    at /home/runner/work/_actions/release-drafter/release-drafter/v5/dist/index.js:16687:19',

and we are not using a “minor” label, so that detail is probably not central to the breakage.

I have restored things to working order in a repo by locking the version to 5.15.0 so one of the two recent releases must have broken this.

For those who want to use this workaround, here’s what I did:

I changed

        uses: release-drafter/release-drafter@v5

to

        uses: release-drafter/release-drafter@v5.15.0

and on my next merge to my main branch all worked as expected.

(heads up @KevinBatdorf in case this helps you)

1reaction
jetersencommented, Jan 15, 2022

Nah, the default config ensure our code base works as expected on objects without too much conditional code logic 😃

See #1012

Read more comments on GitHub >

github_iconTop Results From Across the Web

Issue with version label embedded as a quick part
1.Click on Settings > Document Library Settings> Versioning settings and you make sure that you're either having it “create major versions” or “ ......
Read more >
Semantic Versioning 2.0.0 | Semantic Versioning
MINOR version when you add functionality in a backwards compatible manner; PATCH version when you make backwards compatible bug fixes. Additional labels for...
Read more >
How to Fix Unsupported major.minor Version 52.0 Error in Java
This error can usually be fixed by running the application on the same (or higher) JRE version as the JDK. What Causes Unsupported...
Read more >
Error "The label reference, Version, could not be found". when ...
Per my research, the reason should be there is no Version column in this site content type. The Version column is part of...
Read more >
Can not upgrade Aurora RDS Postgres version from 12 to 13
I choose Engine version 13.3, default DB cluster parameter group and DB parameter group default.aurora-postgresql13 and choose 'Apply ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found