Giter VIP home page Giter VIP logo

Comments (7)

vim-zz avatar vim-zz commented on June 13, 2024

@atomfinger can you share you current automation rule?

from gitstream.

atomfinger avatar atomfinger commented on June 13, 2024

@vim-zz It's basically what you have in your tutorial:

  the_right_reviewer:
    if:
      - true
    run:
      - action: add-comment@v1
        args:
          comment: |
            {{ repo | explainRankByGitBlame(gt=25) }}
      - action: add-reviewers@v1
        args:
          reviewers: {{ repo | rankByGitBlame(gt=25) }}

To then filter out people we need to do something like this:

config:
  user_mapping:
    - 'user that is part of team': 'atomfinger'
    - 'user that is no longer in team': null

from gitstream.

vim-zz avatar vim-zz commented on June 13, 2024

And you would like to make sure that the assigned reviewer is a memebr of the PR author team? or do you have different desired logic?

from gitstream.

atomfinger avatar atomfinger commented on June 13, 2024

@vim-zz

And you would like to make sure that the assigned reviewer is a memebr of the PR author team?

Well, not necessarily the PR author team. Just that the assigned reviewer is part of a specific team. The team might be the PR author team, but it isn't necessarily a given.

Something like this would be cool:

          reviewers: {{ repo | rankByGitBlame(gt=25, team="Team A") }}

But I'll happily accept having to use a filter or something else that might be more appropriate. I get that it might be undesirable to keep adding parameters to rankByGitBlame.

from gitstream.

vim-zz avatar vim-zz commented on June 13, 2024

Got it. I am thinking of something like below, that will keep only users from 'Team A' in the resulting list.

 reviewers: {{ repo | rankByGitBlame(gt=25) | filterUsersOf(['Team A']) }}

Does it solve your problem?

[Edit] to clarify filterUsersOf is not yet implemented.

from gitstream.

atomfinger avatar atomfinger commented on June 13, 2024

@vim-zz , that would be perfect, yeah!

from gitstream.

BenLloydPearson avatar BenLloydPearson commented on June 13, 2024

@atomfinger I'm happy to share that gitStream now supports JavaScript plugins to build custom filter functions. Here are the docs.

This enables you to extend gitStream capabilities substantially and should allow you to build a plugin that accomplishes what you're looking for. I created a post in our discussion forum for this plugin suggestion.

#416

We'd love to hear about any other ideas you have for plugin. We'd also love it if you share anything you create to solve this challenge, we can publish it in our plugin library if that interests you.

Thanks again! Let me know if you have questions.

from gitstream.

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.