Code Monkey home page Code Monkey logo

Comments (14)

milesj avatar milesj commented on June 3, 2024

@jeacott1 Set the auto-install option to false.

from conventional-pr-action.

jeacott1 avatar jeacott1 commented on June 3, 2024

@milesj with auto-install false the action doesn't work.
Error: Preset "conventional-changelog-beemo" does not exist.

from conventional-pr-action.

milesj avatar milesj commented on June 3, 2024

@jeacott1 Yes, a preset is required and that's why auto-install installs it. Either auto-install, install it manually, or change your preset.

from conventional-pr-action.

jeacott1 avatar jeacott1 commented on June 3, 2024

@milesj I dont see any docs on how that should be done, nor how I would expect to do that without affecting my target project? what's the point of a build validation tool that pollutes the build?

from conventional-pr-action.

milesj avatar milesj commented on June 3, 2024

@jeacott1 Conventional commits requires a preset, which is an npm package. It needs to be installed somehow.

This action auto-installs it to simply the process. Typically the action is ran in isolation (as seen here: https://github.com/beemojs/beemo/blob/master/.github/workflows/pr.yml#L5) which is a non-issue. I'm curious why you think this is undesirable since it happens in CI and is not committed?

from conventional-pr-action.

jeacott1 avatar jeacott1 commented on June 3, 2024

@milesj I'm using this on a react project that has its own package.json. on PR first the PR is vetted by this action for conventional commits - which modifies MY PROJECTs package.json. I then build my project, run tests, and push snapshot artifacts.
the fact that this project alters the dependency list of my project is is clearly a problem - it could affect/break things, add libs and transient dependencies.

for releases it isnt an issue because I dont invoke this action.

perhaps if there was an option, or it defaulted to running in a different working directory it would fix the issue? or perhaps better, containerise a version so that it's faster to start and wont try to modify things on the host.

from conventional-pr-action.

milesj avatar milesj commented on June 3, 2024

Well there is an option to disable it:

- uses: beemojs/conventional-pr-action@v2
  with:
    auto-install: false

I've also updated the readme with some instructions on these approaches.

from conventional-pr-action.

jeacott1 avatar jeacott1 commented on June 3, 2024

why dont you just checkout this action to a different directory? wouldnt that fix this issue?

'If you don't want to use automatic installation, you'll need to disable the auto-install option, and add your chosen preset manually to devDependencies in the root package.json."

isnt the root package json here going to be the working tree of the target projects checkout still? manual or auto - how does this help?

from conventional-pr-action.

milesj avatar milesj commented on June 3, 2024

@jeacott1 This action is built on JS, and requires the preset to somehow exist. If you weren't using this action, you would have to install all of these deps in your root package.json anyways.

isnt the root package json here going to be the working tree of the target projects checkout still? manual or auto - how does this help?

I hope you understand that the manual approach requires your committing the package.json changes, and not to install the dep as part of the action workflow in CI.

why dont you just checkout this action to a different directory? wouldnt that fix this issue?

I'm not sure what action limitations are, but probably. I would have to ensure it's a clean directory, and then create a random package.json to handle the installation. I don't have time right now to look into this.

from conventional-pr-action.

jeacott1 avatar jeacott1 commented on June 3, 2024

why would I commit "conventional-changelog-beemo": "^3.0.1" as a dependency of my project - it just isnt.

I'll just find a different action I think.
thanks.

from conventional-pr-action.

milesj avatar milesj commented on June 3, 2024

@jeacott1 That's how the npm conventional commits packages work.

https://www.npmjs.com/package/conventional-commits-parser
https://www.npmjs.com/package/conventional-changelog-preset-loader

from conventional-pr-action.

jeacott1 avatar jeacott1 commented on June 3, 2024

@milesj sure - so when you setup your action - do it in a different folder and run it from there. (ie use a different working dir). then your npm install will install to your project, and my project will remain untouched.

from conventional-pr-action.

milesj avatar milesj commented on June 3, 2024

I don't disagree, just letting you know how it currently works.

from conventional-pr-action.

jeacott1 avatar jeacott1 commented on June 3, 2024

@milesj sure - I guess the only workaround then is to run it as a separate job as a pre-workflow.

from conventional-pr-action.

Related Issues (10)

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.