Giter VIP home page Giter VIP logo

Comments (3)

srvaroa avatar srvaroa commented on May 31, 2024

Thanks for reporting!

I think there is indeed a bug in the condition evaluations that will indeed take only the result of the latest condition, I'll review it later and try to get it fixed.

That said I'm not sure fixing this will give you the result you expect. I understand from your report that you'd actually want an OR (e.g. apply the label if either the title or files match). Is that right?

The current (buggy) implementation tries to AND all conditions, so this:

  WIP:
    title: "^WIP:.*"
    files:
      - "cmd/.*_tests.go"

Would only apply the label if both conditions match.

It's possible to implement the OR behaviour with minor changes. If you're interested in that I can get both changes in.

from labeler.

Stoom avatar Stoom commented on May 31, 2024

Yeah, Ideally it would apply if any of the conditions are met. I guess a workaround for this could be listing the label twice.

from labeler.

srvaroa avatar srvaroa commented on May 31, 2024

Hi @Stoom this PR should fix both the bug, and allow implementing the OR with multiple matchers (it requires an update in config format but it should be fairly straight forward).

I've added a few tests for this so I'm fairly confident this will work, but if you can give it a go using that branch (with this in your github workflows yaml):

 - uses: srvaroa/[email protected]

That'd be very appreciated.

from labeler.

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.