changelog-ci
changelog-ci copied to clipboard
Action marked as success despite error occuring
Describe the bug
Hi, I'm having an issue where in a PR where I forgot (or failed) versioning in the title, the run itself hits an error but marks it as successful, meaning the PR can be merged without a valid changelog. I'm fairly new to Github Actions so I might be missing something obvious, checked the other issues in this repo and saw nothing, so coming here for help.
Your Environment
Workflow Run URL (if Public Repository): https://github.com/MoonieGZ/TwoMoons/actions/runs/5298499154/jobs/9590890439
Contents of Your Changelog-CI Workflow File (.yaml File):
name: Changelog CI
on:
pull_request:
types: [ opened ]
workflow_dispatch:
inputs:
release_version:
description: 'Set Release Version'
required: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Run Changelog CI
uses: saadmk11/[email protected]
with:
changelog_filename: CHANGELOG.md
config_file: .github/changelog-ci-config.yaml
github_token: ${{ secrets.GITHUB_TOKEN }}
Contents of Changelog-CI Configuration File (If Applicable):
changelog_type: 'commit_message' # or 'pull_request'
header_prefix: 'Version:'
commit_changelog: true
comment_changelog: true
include_unlabeled_changes: true
unlabeled_group_title: 'Unlabeled Changes'
pull_request_title_regex: '^Release'
version_regex: 'v?([0-9]{1,2})+[.]+([0-9]{1,2})+[.]+([0-9]{1,2})\s\(\d{1,2}-\d{1,2}-\d{4}\)'
exclude_labels:
- bot
- dependabot
- ci
group_config:
- title: Bug Fixes
labels:
- bug
- bugfix
- title: Code Improvements
labels:
- improvements
- enhancement
- title: New Features
labels:
- feature
- title: Documentation Updates
labels:
- docs
- documentation
- doc
Expected behavior
Check to fail when an error occurs.
Actual behavior
Run hits an error but marks check as success.
This was done intentionally so that PR's that are not release PR's don't get a Failed CI status
This was done intentionally so that PR's that are not release PR's don't get a Failed CI status
Despite it's a bit strange logic, this action is marked success even if it has errors in PRs with a correct name:
- Run Changelog CI -> Parse Configuration and Generate Changelog steps
- Run Changelog CI -> Generate Changelog step
Moreover, I don't understand the following. It is said that:
For pull_request event:
- Generates changelog using Pull Request Titles or Commit Messages made after the last release.
-
The created CHANGELOG.rst contains wrong description. Commits, listed under
Version: v1.1.0
, were made before tag v1.0.1 and commitci
, mentioned underRelease: v1.0.1
, was made before tag v1.0.0. The commits, made for tag v1.1.0 , are not listed. You can check it in Full Changelog links of release notes. All tags were made right after the correspondent PRs were merged in themain
branch. - This run failed to find any new commits after the last release, but there were at least 3. Otherwise the PR would not be created ever.
Am I doing something wrong, or my expectations are incorrect?