Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: auto PR review #1082

Merged
merged 1 commit into from
Aug 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 64 additions & 0 deletions .github/labeler.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
car interfacing:
- changed-files:
- any-glob-to-all-files: "{opendbc/car/**}"

can:
- changed-files:
- any-glob-to-all-files: "{opendbc/can/**}"

DBC signals:
- changed-files:
- any-glob-to-all-files: "{opendbc/dbc/**}"


body:
- changed-files:
- any-glob-to-all-files: 'opendbc/car/body/*'

chrysler:
- changed-files:
- any-glob-to-all-files: 'opendbc/car/chrysler/*'

ford:
- changed-files:
- any-glob-to-all-files: 'opendbc/car/ford/*'

gm:
- changed-files:
- any-glob-to-all-files: 'opendbc/car/gm/*'

honda:
- changed-files:
- any-glob-to-all-files: 'opendbc/car/honda/*'

hyundai:
- changed-files:
- any-glob-to-all-files: 'opendbc/car/hyundai/*'

mazda:
- changed-files:
- any-glob-to-all-files: 'opendbc/car/mazda/*'

nissan:
- changed-files:
- any-glob-to-all-files: 'opendbc/car/nissan/*'

subaru:
- changed-files:
- any-glob-to-all-files: 'opendbc/car/subaru/*'

tesla:
- changed-files:
- any-glob-to-all-files: 'opendbc/car/tesla/*'

toyota:
- changed-files:
- any-glob-to-all-files: 'opendbc/car/toyota/*'

volkswagen:
- changed-files:
- any-glob-to-all-files: 'opendbc/car/volkswagen/*'

fingerprint:
- changed-files:
- any-glob-to-all-files: 'opendbc/car/*/fingerprints.py'
50 changes: 50 additions & 0 deletions .github/workflows/auto_pr_review.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: "PR review"
on:
pull_request_target:
types: [opened, reopened, synchronize, edited, edited]

jobs:
labeler:
name: review
permissions:
contents: read
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

# Label PRs
- uses: actions/labeler@v5.0.0
with:
dot: true
configuration-path: .github/labeler.yaml

# Check PR target branch
- name: check branch
uses: Vankka/pr-target-branch-action@def32ec9d93514138d6ac0132ee62e120a72aed5
if: github.repository == 'commaai/opendbc'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
target: /^(?!master$).*/
exclude: /commaai:.*/
change-to: ${{ github.base_ref }}
already-exists-action: close_this
already-exists-comment: "Your PR should be made against the `master` branch"

# Welcome comment
- name: comment
uses: thollander/actions-comment-pull-request@fabd468d3a1a0b97feee5f6b9e499eab0dd903f6
if: github.event.pull_request.head.repo.full_name != 'commaai/opendbc'
with:
message: |
<!-- _(run_id **${{ github.run_id }}**)_ -->
Thanks for contributing to opendbc! In order for us to review your PR as quickly as possible, check the following:
* Convert your PR to a draft unless it's ready to review
* Read the [contributing docs](https://github.com/commaai/openpilot/blob/master/docs/CONTRIBUTING.md)
* Before marking as "ready for review", ensure:
* the goal is clearly stated in the description
* all the tests are passing
* include a route or your device' dongle ID if relevant
comment_tag: run_id
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}