question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add automated labelling to staged-recipes

See original GitHub issue

This is a proposal to add automated labelling to the staged-recipes repo using GitHub actions. I’m opening this as an issue instead of a PR as I wanted to get some input first what everybody else thinks. As conda-forge is generally very hands-on I didn’t want to add too much automation and thought that the following would be a good start:

  1. Label PRs based on the requested team. This is pretty straightforward and would only add a label with the pinged team. It would make browsing PRs easier and quicker as you can see if it’s in your domain or not. Additionally, even PRs by new contributors that cannot yet ping a team are labelled and can be marked as ready for review.

    The GitHub actions yaml would be something like this:

    name: Label PRs
    
    on:
      issue_comment:
        types: [created]
    
    jobs:
      label-pr:
        name: Label PR
        if: ${{ github.event.issue.pull_request }}
        runs-on: ubuntu-latest
        strategy:
          matrix:
           include:
             - label: 'staged-recipes'
               comment: '@conda-forge/staged-recipes'
    
             - label: 'python'
               comment: '@conda-forge/help-python'
    
             - label: 'python-c'
               comment: '@conda-forge/help-python-c'
    
             - label: 'r'
               comment: '@conda-forge/help-r'
    
             - label: 'java'
               comment: '@conda-forge/help-java'
    
             - label: 'nodejs'
               comment: '@conda-forge/help-nodejs'
    
             - label: 'c-cpp'
               comment: '@conda-forge/help-c-cpp'
    
             - label: 'perl'
               comment: '@conda-forge/help-perl'
    
             - label: 'julia'
               comment: '@conda-forge/help-julia'
    
             - label: 'ruby'
               comment: '@conda-forge/help-ruby'
    
        steps:
          - name: team-label
            if: contains(github.event.comment.body, matrix.comment)
            env:
              label: ${{ matrix.label }}
            uses: actions/github-script@v6
            with:
              script: |
                github.rest.issues.addLabels({
                  issue_number: context.issue.number,
                  owner: context.repo.owner,
                  repo: context.repo.repo,
                  labels: [process.env.label, 'review-requested']
                })
    

    I tested the code locally and noticed a couple of small issues:

    1. conda-forge/help-python-c also includes conda-forge/help-python as it checks if the string is included.
    2. Currently runs for every label as the if is only checked during the run. Maybe there is a better way.
  2. Add review-requested lables This would be set with the above action and the reviewer can then remove it again manually (can also be automated probably).

    The benefit of this is that sometimes PRs are missed because no-one reviewed them which would now be visible. So instead of going to each PR and checking if it has been reviewed yet, it can be seen from the overview page.

    Additionally, the staged-recipes team can see if the reason another team member commented was because they reviewed the PR or are the author and actually still need a review.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:20 (20 by maintainers)

github_iconTop GitHub Comments

2reactions
beckermrcommented, Mar 28, 2022

That seems fine to me. Let’s not the perfect be the enemy of the good or w/e.

2reactions
carterboxcommented, Mar 28, 2022

Correction : A review from anyone (regardless of team membership) will clear the “review-requested” tag. Normal comments would not affect the ‘review-requested’ label because reviews and comments have separate triggers.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Actions · conda-forge/staged-recipes - GitHub
A place to submit conda recipes before they become fully fledged conda-forge feedstocks - Actions · conda-forge/staged-recipes.
Read more >
Automate Data Labeling - Amazon SageMaker
If you choose, Amazon SageMaker Ground Truth can use active learning to automate the labeling of your input data for certain built-in task...
Read more >
Making automated data labeling a reality in modern AI
Automated data labeling (auto-labeling) is achieved via programmatic labeling. Learn how it works and compares to common manual labeling ...
Read more >
An Introduction to Automated Data Labeling - Superb AI
Classification by itself involves selecting a label from a dropdown list; there is no drawing or outlining objects with a mouse. Classification can...
Read more >
Getting Started with Label Automation - BradyID.com
Automating your label process is a simple, cost-effective way to get started with automation. Learn how you can dramatically reduce errors and increase ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found