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

Release-drafter uses default 0.1.0 as resolved version for the draft version #1377

Open
alvinlee00 opened this issue Jan 24, 2024 · 0 comments

Comments

@alvinlee00
Copy link

Posting a bug report here in case others also faced the same issue.

The Issue

It seems that the release-drafter Github action is providing the incorrect version for the draft release version despite picking up the correct Last release.

Here is a Github Action log snippet:

Run release-drafter/release-drafter@v5.25.0
"pull_request_target.opened" is not a known webhook name (https://developer.github.com/v3/activity/events/types/)
"pull_request_target.reopened" is not a known webhook name (https://developer.github.com/v3/activity/events/types/)
"pull_request_target.synchronize" is not a known webhook name (https://developer.github.com/v3/activity/events/types/)
"pull_request_target.edited" is not a known webhook name (https://developer.github.com/v3/activity/events/types/)
pepsico-ecommerce/infomart: Found 1000 releases
{ name: 'event', id: '7[6](https://github.com/pepsico-ecommerce/infomart/actions/runs/7645480203/job/20832160426#step:2:7)45480203' }
pepsico-ecommerce/infomart: No draft release found
{ name: 'event', id: '[7](https://github.com/pepsico-ecommerce/infomart/actions/runs/7645480203/job/20832160426#step:2:8)6454[8](https://github.com/pepsico-ecommerce/infomart/actions/runs/7645480203/job/20832160426#step:2:9)0203' }
pepsico-ecommerce/infomart: Last release: 1.1.028
{ name: 'event', id: '7645480203' }
pepsico-ecommerce/infomart: Fetching parent commits of refs/heads/master since 2024-01-23T22:50:56Z
{ name: 'event', id: '7645480203' }
pepsico-ecommerce/infomart: Creating new release
{ name: 'event', id: '7645480203' }

The $RESOLVED_VERSION we are using for the name and tag are using the default 0.1.0. I would also like to mention that it seems like its only finding 1000 releases, however more than 1000 releases exist.

Environment

We are using release-drafter via Github Actions with release_drafter.yml as follows:

name: Release Drafter

on:
  push:
    branches:
      - master
      - hotfix

jobs:
  update_release_draft:
    runs-on: ubuntu-20.04
    steps:
      - uses: release-drafter/release-drafter@v5.25.0
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

and release-drafter.yml:

name-template: '$RESOLVED_VERSION'
tag-template: '$RESOLVED_VERSION'
change-template: '- $TITLE (#$NUMBER, @$AUTHOR)'
version-resolver:
  major:
    labels:
      - 'major'
  minor:
    labels:
      - 'minor'
  patch:
    labels:
      - 'patch'
  default: patch
template: |
  <!--- To tag a release as "latest," it must come from the "master" branch. -->
  <!--- When creating a branch from another branch, add "hotfix" in its tag. Its image will not be tagged "latest" -->
  <!--- The "Set as the latest release" checkbox below only adds a visual label and doesn't affect functionality. -->
  
  ## Changes
  $CHANGES

  ## Contributors
  $CONTRIBUTORS
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

1 participant