beemojs / conventional-pr-action

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

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

Closed mrmartineau closed 3 years ago

mrmartineau commented 3 years ago

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?

milesj commented 3 years ago

@mrmartineau Correct. If auto-install is false, no package manager installs/adds are triggered. It assumes the environment has been prepared already.

So you would need to have the preset in your projects dependencies, and do a yarn install in the job before running this action.

mrmartineau commented 3 years ago

Thanks for the response @milesj, but I am fairly certain that the when I set auto-install to false that it still installed everything. I will check again to confirm though.

Can you also tell me that if it does indeed not install any packages, do I just need to install the beemo preset in order for this to work?

milesj commented 3 years ago

@mrmartineau Maybe how GH/yaml handles truthiness is different than what I expect? https://github.com/beemojs/conventional-pr-action/blob/master/src/index.ts#L138

yarn add --dev conventional-changelog-beemo should be enough to resolve this.

milesj commented 3 years ago

This should be fixed now.