Coder Social home page Coder Social logo

Comments (10)

orthros avatar orthros commented on July 22, 2024

Startblock is a tool the DRIFT team has used when managing PRs/CLs.

The tl;dr is IFTTT for Pull Requests and code review.

Consider a PR that has been made with this snippet in the body of the PR

Startblock:
  has lgtm from orthros
  has lgtm from jmdobry
  has label good-to-merge
  ci passes

The bot would then iterate through these gated steps and as soon as all conditions pass, would merge the PR.

The bot can, however have more complex logic put into it in order to "gate" certain conditions, and modify the PR itself so as to not spam users.

Consider instead this Startblock declaration

Startblock:
  has lgtm from orthros
  and then
  add reviewer jmdobry
  and then
  has lgtm from jmdobry
  and then
  add label kokoro:run
  and then 
  has label good-to-merge
  ci passes
  and is Sunday

This declaration tells the bot to not request review from jmdobry until after orthros has given an lgtm, which keeps jmdobry from having to review changes that are unready for them to view.

from repo-automation-bots.

jmdobry avatar jmdobry commented on July 22, 2024

The bot could manage its state on a PR via review comments. When the bot is first added as a reviewer, it parses the PR body for the bot conditions, then adds a review: Approval if the conditions have all been met or Changes Requested if something in the condition chain is unmet. The comment itself contains a prettier version of the condition block, describing the bot's idea of what needs to happen. The bot re-examines the PR and conditions continuously (some of the conditions might be time-based).

from repo-automation-bots.

tmatsuo avatar tmatsuo commented on July 22, 2024

Github has it's own way of configure branch protection rules, and I think most of the repos are using it.
Probably it's very unpopular feature request, and will never be implemented unless @jmdobry write it.

Closing, but feel free to reopen.

from repo-automation-bots.

jmdobry avatar jmdobry commented on July 22, 2024

This feature request was not describing a form of branch protection, rather it describes a 100x more useful/powerful version of your merge on green bot.

from repo-automation-bots.

tmatsuo avatar tmatsuo commented on July 22, 2024

@jmdobry That's nice! Feel free to contribute or build your own :)

from repo-automation-bots.

tmatsuo avatar tmatsuo commented on July 22, 2024

@jmdobry
To be clear, I agree this is a cool idea, and it is useful, but considering the current situation, this feature request won't be prioritized in our team among other things.

from repo-automation-bots.

bcoe avatar bcoe commented on July 22, 2024

Going to go ahead and reopen this, because @danielbankhead and I have been talking about a feature that is a subset of this functionality. For purposes of enforcing SLSA code review rules. I think it might be worth thinking about some useful features from Startblock while we work on this automation.

from repo-automation-bots.

tmatsuo avatar tmatsuo commented on July 22, 2024

I guess @danielbankhead went a different route with allstar.

from repo-automation-bots.

danielbankhead avatar danielbankhead commented on July 22, 2024

@tmatsuo I think we can keep this open - the Allstar Review bot covers a subset of this functionality, but as expressive as this feature request

from repo-automation-bots.

tmatsuo avatar tmatsuo commented on July 22, 2024

Thanks! I'd close this as wontfix

from repo-automation-bots.

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.