Code Monkey home page Code Monkey logo

Comments (13)

pmcjury avatar pmcjury commented on May 23, 2024 3

Would this cause issues with any downstream plugins?

The issue I think right now is the commits are all pulled in by git-log-parser in semantic-release itself. It currently does not return the paths in a commit --stat option. This would be required to filter messages with some glob.

https://github.com/semantic-release/semantic-release/blob/master/lib/git.js#L48

If semantic-release is able to add that to the commit context the commit analyzer filter function in the index could could simply filter by a glob or not files: ["someDir/**", "./packages/someOtherDir/**"]

from commit-analyzer.

mattthaber avatar mattthaber commented on May 23, 2024

i second this. Am currently looking to be able to do this functionality

from commit-analyzer.

nataly87s avatar nataly87s commented on May 23, 2024

I ran into the same issue, monorepo with multiple releases.
I ended up creating my own plugin that wraps other plugins and filters the commits before passing them to the wrapped plugin.
If anyone is interested, I can open source the commit filter

from commit-analyzer.

pmcjury avatar pmcjury commented on May 23, 2024

@nataly87s does the commit object contain the filename/paths?

from commit-analyzer.

nataly87s avatar nataly87s commented on May 23, 2024

@pmcjury no, I used this to get the filenames:

  const { exec } = require('child_process');

  const folders = await new Promise((resolve, reject) => {
    exec(
      `git diff-tree --no-commit-id --name-only ${commit.commit.long}`,
      (error, stdout, stderr) => {
        if (error) {
          reject(error);
          return;
        }
        if (stderr) {
          reject(new Error(stderr));
          return;
        }

        resolve(stdout.trim().split('\n'));
      }
    );
  });

from commit-analyzer.

sinedied avatar sinedied commented on May 23, 2024

I ran into the same issue, monorepo with multiple releases. I ended up creating my own plugin that wraps other plugins and filters the commits before passing them to the wrapped plugin. If anyone is interested, I can open source the commit filter

I would be interested in this, since I'm running into the same issue! 🙂

from commit-analyzer.

saleh199 avatar saleh199 commented on May 23, 2024

@nataly87s I'm interested in this, having same issue with monorepo

from commit-analyzer.

nataly87s avatar nataly87s commented on May 23, 2024

@sinedied @saleh199
I'll have to dig out the code from three years ago 😅
I'll do it later tonight when I have some time

from commit-analyzer.

sinedied avatar sinedied commented on May 23, 2024

Thanks! In the meantime I've found a workaround using https://github.com/pmowrer/semantic-release-monorepo

from commit-analyzer.

saleh199 avatar saleh199 commented on May 23, 2024

@sinedied this have only support for JS packages, but what about non-js packages

from commit-analyzer.

sinedied avatar sinedied commented on May 23, 2024

That's why I said it was a workaround (for me), not a universal solution 😉
We definitely miss a the ability to filter commits by scope or file path, that would solve most monorepo issues (with any language).

from commit-analyzer.

adem-antipodestudios avatar adem-antipodestudios commented on May 23, 2024

Hello guys ! Any update on this feature request ?

from commit-analyzer.

mrclrchtr avatar mrclrchtr commented on May 23, 2024

We are also interested in this.

from commit-analyzer.

Related Issues (20)

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.