beemojs / conventional-pr-action Goto Github PK
View Code? Open in Web Editor NEWGitHub Action that validates the PR title and commits against a Conventional Commits preset.
GitHub Action that validates the PR title and commits against a Conventional Commits preset.
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
[...]
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.
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?
Steps to reproduce:
feat:
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.
Hi,
Not sure if this is a user error (aka me) or bug, but if you do:
Hello and thanks for you work !
I found out that action fails when using valid commit types like feat
and refactor
. Is it normal ? Am I doing something wrong ?
As title says, the action expects that a package.json is in the root folder, which is not always the case for monorepos. If a package.json is not found, creating one before running npm ci
would resolve this issue.
if I create an action and checkout a node/react/whatever project with a package.json file,
when this conventional-pr-action is run the package.json is modified, adding:
"dependencies": {
...
"conventional-changelog-beemo": "^3.0.1",
this is clearly undesirable.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.