Code Monkey home page Code Monkey logo

conventional-pr-action's Issues

Intended behaviour - auto-install still installs when set to false

I am not sure that this action is running correctly, can you confirm if it is supposed to install my npm dependencies given the config below:

name: Check PR title
on:
  pull_request:
    types: [opened, synchronize, reopened, edited]

jobs:
  lint_title:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-node@v2
      - uses: beemojs/conventional-pr-action@v2
        with:
          require-multiple-commits: false
          auto-install: false
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

If auto-install is set to false does that mean that I need to manually install the beemo preset?

Repo without package-lock.json error

I have a Kotlin Project so it do not have any package.json/package-lock.json and it crash due to a missing package-lock file

Run beemojs/conventional-pr-action@v2
  with:
    config-preset: angular
    name: Conventionnal Commit
    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 ci
  npm ERR! The `npm ci` command can only install with an existing package-lock.json or
  npm ERR! npm-shrinkwrap.json with lockfileVersion >= 1. Run an install with npm@5 or
  npm ERR! later to generate a package-lock.json file, then try again.
  
  npm ERR! A complete log of this run can be found in:
  npm ERR!     /home/runner/.npm/_logs/2022-01-03T11_31_21_000Z-debug.log
  Error: The process '/usr/local/bin/npm' failed with exit code 1

require-multiple-commits value treated as string

[...]
  if (getInput('require-multiple-commits') && pr.commits < 2)
[...]

getInput() returns string so in case the configuration is require-multiple-commits: false it will not work properly.
getBooleanInput() should be used instead.

Commits whose titles start with `feat:` are considered invalid

Steps to reproduce:

Actual result:
The validation fails.This does not happen for other valid prefixes, like ci: or docs:. See https://github.com/appium/appium-uiautomator2-driver/runs/8222140787?check_suite_focus=true

Expected result:
All prefixes defined at https://www.conventionalcommits.org/en/v1.0.0/ must be recognized as valid ones.

Failure while loading the angular preset

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?

commit update still considered invalid

Hi,

Not sure if this is a user error (aka me) or bug, but if you do:

  • PR with a commit message that is not a conventional commit
  • Action fails due to invalid commit !
  • User does a rebase and updates commit message
  • git push --force origin branch name
  • this updates github and i see the commits show up as coventional commits
  • job reruns
  • job fails again saying:
    image

Breaking changes via ! for conventionalcommits preset not recognized

First, thanks for creating this Github Action!

I'm getting the following error: Error: PR title doesn't follow conventional changelog format. with the following PR title ci(envs)!: some description here and the following release.yml:

on:
  pull_request:
    types: [opened, edited, synchronize, reopened]
name: ci
jobs:
  conventional-commits:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: '20.8.1'
      - uses: beemojs/conventional-pr-action@v2
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        with:
          config-preset: conventionalcommits

I believe I'm setting the preset correctly to conventionalcommits and have also tried auto-install: false with the preset in my devDependencies but still get the same error. Any ideas?

FWIW, I tried conventional-commits-parser on the same commit string via CLI and got the following response:

% conventional-commits-parser
ci(envs)!: some description here


{"type":null,"scope":null,"subject":null,"merge":null,"header":"ci(envs)!: some description here","body":null,"footer":null,"notes":[],"references":[],"mentions":[],"revert":null}

The type: null part is suspect..

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.