Giter VIP home page Giter VIP logo

Comments (6)

SvanBoxel avatar SvanBoxel commented on July 20, 2024

Hi @Jared-Dev , sound reasonable. I don't have a lot of bandwidth at the moment, but looking at your profile you're comfortable with javascript and probot apps. If you want to you can open a PR. 😄

from delete-merged-branch.

Jared-Dev avatar Jared-Dev commented on July 20, 2024

If I have some time open up I can try to take a stab. Can you point me in a sensible direction or basic structure you'd like to see?

from delete-merged-branch.

SvanBoxel avatar SvanBoxel commented on July 20, 2024

You need to extract the label from the issue, this is part of the event payload.

You probably want to look at an implementation that is similar to what is happening here:

if (config.exclude.some((rule) => new RegExp(`^${rule.split('*').join('.*')}$`).test(branchName))) {
context.log.info(`Branch ${branchName} excluded. Keeping ${context.payload.pull_request.head.label}`)
return
}

in the snippet above it looks in de app config for branchnames to exclude.

from delete-merged-branch.

Jared-Dev avatar Jared-Dev commented on July 20, 2024

Since exclude is in use, do you have a preference on the name? I've started working on it a bit (I also don't have much bandwidth atm) and just added excludeLabels, but I really don't have much of an opinion there so...

from delete-merged-branch.

GuillaumeFavelier avatar GuillaumeFavelier commented on July 20, 2024

Something like "Don't delete if label exists" or "Delete only if label exists" would be a very good feature to have in my opinion. The option 2) can even help with #8

from delete-merged-branch.

SvanBoxel avatar SvanBoxel commented on July 20, 2024

Closing this feature request as it won't be implemented anytime soon. (Feel free to open a pr yourself if you want to see this functionality added)

from delete-merged-branch.

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.