beemojs / conventional-pr-action

GitHub Action that validates the PR title and commits against a Conventional Commits preset.
12 stars 3 forks source link

Failure while loading the angular preset #38

Closed mykola-mokhnach closed 4 months ago

mykola-mokhnach commented 4 months ago

Hello We use the following config for the action:

name: Conventional Commits
on:
  pull_request:

jobs:
  lint:
    name: https://www.conventionalcommits.org
    runs-on: ubuntu-latest
    steps:
    - uses: beemojs/conventional-pr-action@v2
      with:
          config-preset: angular
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Previously it was working without issue, but now the execution always fails with the following error:

Run beemojs/conventional-pr-action@v2
  with:
    config-preset: angular
    auto-install: true
    config-version: latest
    require-multiple-commits: false
  env:
    GITHUB_TOKEN: ***
Loading GitHub context and pull request
Installing dependencies with npm
  /usr/local/bin/npm install

  up to date, audited 1 package in 271ms

  found 0 vulnerabilities
Installing preset package conventional-changelog-angular@latest
  /usr/local/bin/npm install conventional-changelog-angular@latest

  added 5 packages, and audited 6 packages in 501ms

  found 0 vulnerabilities
Loading preset package
Error: Preset "conventional-changelog-angular" does not exist.

See https://github.com/appium/java-client/actions/runs/8965038536/job/24617789030?pr=2167 for more details.

Is this a genuine issue or there's something we have done wrong in the pipeline config?

milesj commented 4 months ago

If this was working before and then randomly stopped, then my guess is the environment changed in some way. Maybe the node/npm versions are different?

mykola-mokhnach commented 4 months ago

If this was working before and then randomly stopped, then my guess is the environment changed in some way. Maybe the node/npm versions are different?

Thank you for your response @milesj Yes, this is also weird to me. We use exactly the same job config for all projects, so the only thing that might change over time is the actual image (ubuntu-latest). Nothing else has changed. Shall I try to run the pipeline with an older image (e.g. ubuntu-20.04)?

mykola-mokhnach commented 4 months ago

Or maybe you could suggest the particular node/npm version to set to make the action work properly?

milesj commented 4 months ago

I'm not entirely sure. I did notice that this action is still configured for node16 which was deprecated by Github, so I think my assumption is correct, since they are forced to node20 now.

I'll have to experiment a bit.

milesj commented 4 months ago

This repo is quite old so I'm updating it here: https://github.com/beemojs/conventional-pr-action/pull/39

milesj commented 4 months ago

@mykola-mokhnach Can you try v3, beemojs/conventional-pr-action@v3?

mykola-mokhnach commented 4 months ago

@mykola-mokhnach Can you try v3, beemojs/conventional-pr-action@v3?

Thanks @milesj . I can confirm the issue is fixed in v3: https://github.com/appium/appium-mac2-driver/actions/runs/9013212335/job/24763664339?pr=301

milesj commented 4 months ago

Awesome, will close this.