Giter Club home page Giter Club logo

Comments (7)

bcchenbc avatar bcchenbc commented on May 29, 2024 1

Ah, reverts previous actions tripped me 😅 Thank you for clarification!

(Just confirmed, I did not change the title, btw.)

from pr-title-checker.

bcchenbc avatar bcchenbc commented on May 29, 2024 1

Removing ignoreLabels (setting it to []) works just fine for me. Thank you!

from pr-title-checker.

thehanimo avatar thehanimo commented on May 29, 2024

Your changes are in dist/, which is the build output of index.ts. All changes have to be made in the source file, which is index.ts.

For the problem itself, I think the tool works as intended. In your case, I'm assuming the title has a ticket number but you manually want to add a "No Ticket" label to it? I'm not sure if that is the use case here but I'm sure that the tool does not (and possible cannot) support it. It takes away the base logic of "if not formatted, add label; if formatted, remove label".

Does that make sense?

from pr-title-checker.

thehanimo avatar thehanimo commented on May 29, 2024

If you do want it to work, you could define a new label such as "verified" or "lint-disable", add this to ignoreLabels and tag PRs that you don't want the bot to check with it.

from pr-title-checker.

bcchenbc avatar bcchenbc commented on May 29, 2024

Thank you for prompt reply! & for clarification (re: index.ts, I'll make a change to this line https://github.com/thehanimo/pr-title-checker/blob/main/index.ts#L285 when available, if that works for you)!

The PR I created did not have a ticket number, and I didn't modify the title during the process. I was hoping that the bot would add the No Ticket label, and keep it there. Would you mind checking if my experience was expected? What happened was something like:

  1. (the 10 mins ago line) I created the PR (the bot added No Ticket as expected).
  2. (the 6 mins line from me) I added other two labels,
  3. (the 6 mins line from bot) the bot got triggered again, but removed the No Ticket label (which is unexpected).
  4. (the 5 mins line from me) I tried to added back the No Ticket label, but
  5. (the 5th line from bot) the bot got triggered again and removed the label.

I guess I'm a bit confused about how to interpret ignoreLabels. I was expecting that if the bot sees a ignoring label, it'll do nothing. If the title is not formatted, it'll add the label at the first execution (when PR was created). But it'd do nothing in following executions (for example, when modifying other labels), since the ignoring label is there. It'll be really nice if I can still with one label, so... really hope that it could work 😄

from pr-title-checker.

thehanimo avatar thehanimo commented on May 29, 2024

You are almost correct. ignoreLabels does mean it'll do nothing, but also reverts previous actions, i.e., remove tag if it was previously added.

What is unexpected in your flow (likely a bug somewhere) is step 3. If the title was the same in step 1 and 3, the bot should behave in the same way by adding the No Ticket tag. Are you sure there was no change in the title?

from pr-title-checker.

thehanimo avatar thehanimo commented on May 29, 2024

Oh right. It does work as intended. It "undid" its previous action of adding the tag (which in your case coincides with the one to be ignored)

from pr-title-checker.

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.