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

Action marked as success despite error occuring #98

Open
MoonieGZ opened this issue Jun 17, 2023 · 2 comments
Open

Action marked as success despite error occuring #98

MoonieGZ opened this issue Jun 17, 2023 · 2 comments
Labels
question Further information is requested

Comments

@MoonieGZ
Copy link

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/changelog-ci@v1.1.1
        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.

image

@saadmk11
Copy link
Owner

saadmk11 commented Aug 5, 2023

This was done intentionally so that PR's that are not release PR's don't get a Failed CI status

@saadmk11 saadmk11 added the question Further information is requested label Aug 5, 2023
@SerGeRybakov
Copy link

SerGeRybakov commented Aug 16, 2023

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:

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.
  1. The created CHANGELOG.rst contains wrong description. Commits, listed under Version: v1.1.0, were made before tag v1.0.1 and commit ci, mentioned under Release: 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 the main branch.
  2. 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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants