conda-forge / staged-recipes

A place to submit conda recipes before they become fully fledged conda-forge feedstocks
https://conda-forge.org
BSD 3-Clause "New" or "Revised" License
703 stars 4.89k forks source link

feat: unify linting #27590

Closed beckermr closed 2 weeks ago

beckermr commented 2 weeks ago

This PR unifies the staged-recipes linting into a single module in one spot in this repo. It is the complement of https://github.com/conda-forge/conda-smithy/pull/2063.

The job is done in two parts. First, a GHA check runs that computes the lint. This job runs in PR context so it does not have access to privileged credentials. This is an important security step. Then another GHA job is kicked off using an event that allows for a token to run on the upstream repo with write permissions. This second job reads the linting message in the logs of the first and comments with on the PR.

You won't see the comments from the second job on this PR since that job has to run from the default branch of the repo. I tested it out and did some examples using my fork. See https://github.com/beckermr/staged-recipes/pull/10 and https://github.com/beckermr/staged-recipes/pull/11 for examples of the comments.

conda-forge-webservices[bot] commented 2 weeks ago

Hi! This is the friendly automated conda-forge-linting service.

I was trying to look for recipes to lint for you, but couldn't find any. Please ping the 'conda-forge/core' team (using the @ notation in a comment) if you believe this is a bug.

beckermr commented 2 weeks ago

@conda-forge/staged-recipes @conda-forge/core this PR is ready for review!

github-actions[bot] commented 2 weeks ago

To help direct your pull request to the best reviewers, please mention a topic-specifc team if your recipe matches any of the following: conda-forge/help-c-cpp, conda-forge/help-cdts, conda-forge/help-go, conda-forge/help-java, conda-forge/help-julia, conda-forge/help-nodejs, conda-forge/help-perl, conda-forge/help-python, conda-forge/help-python-c, conda-forge/help-r, conda-forge/help-ruby,or conda-forge/help-rust. Thanks!

beckermr commented 2 weeks ago

Any comments here @conda-forge/core or shall we try this out for a while?

beckermr commented 2 weeks ago

This smithy PR that compliments this one was merged, so I am going to merge this one too since they have to go together.