Skip to content

Commit

Permalink
chore(repo): add new labeler
Browse files Browse the repository at this point in the history
  • Loading branch information
tknickman committed Feb 7, 2023
1 parent 40af9cd commit bdf2807
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 54 deletions.
39 changes: 0 additions & 39 deletions .github/labeler.yml

This file was deleted.

72 changes: 72 additions & 0 deletions .github/turbo-orchestrator.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# Docs

# Label Config

# labeler:
# - settings:
# - codeOwnersPath: {PATH TO CODEOWNERS FILE (defaults to .github/CODEOWNERS)}
# - labels:
# - label: {YOUR LABEL NAME}
# condition: {AND (default) | OR}
# when:
# {TEST_FUNCTION}: {REGEX}
# ...
# ...

#| Function Name | Description |
#| --------------------------- | -------------------------------------------------------------------------- |
#| `isAnyFilePathMatch` | Returns true if any filename in the PR diff matches the given regex |
#| `isNotAnyFilePathMatch` | The negation of `isAnyFilePathMatch` |
#| `isPRBodyMatch` | Returns true if the PR description matches the given regex |
#| `isNotPRBodyMatch` | The negation of `isPRBodyMatch` |
#| `isPRTitleMatch` | Returns true if the PR title matches the given regex |
#| `isNotPRTitleMatch` | The negation of `isPRTitleMatch` |
#| `isPRAuthorMatch` | Returns true if the PR author matches the given regex |
#| `isNotPRAuthorMatch` | The negation of `isPRAuthorMatch` |
#| `isPRAuthorCompanyMatch` | Returns true if the PR author's company matches the given regex |
#| `isNotPRAuthorCompanyMatch` | The negation of `isPRAuthorCompanyMatch` |
#| `isAnyFileOwnedByMatch` | Returns true if any owner of a file in the PR diff matches the given regex |
#| `isNotAnyFileOwnerByMatch` | The negation of `isAnyFileOwnedByMatch` |

labeler:
labels:
# teams
- label: "team: turborepo"
when:
isAnyFileOwnedByMatch: '@vercel\/turbo-oss'
- label: "team: turbopack"
when:
isAnyFileOwnedByMatch: '@vercel\/web-tooling'

# areas
- label: "area: ci"
when:
isAnyFilePathMatch: '^\.github\/(workflows|actions).*$'
- label: "area: examples"
when:
isAnyFilePathMatch: '^examples\/.*$'
- label: "area: docs"
when:
isAnyFilePathMatch: '^docs\/.*\.mdx$'
- label: "area: site"
when:
isAnyFilePathMatch: '^docs\/.*\.(?!mdx).*$'

# packages
- label: "pkg: turbo-eslint"
when:
isAnyFilePathMatch: '^packages\/eslint-(plugin|config)-turbo\/.*$'
- label: "pkg: turbo-ignore"
when:
isAnyFilePathMatch: '^packages\/turbo-ignore\/.*$'
- label: "pkg: turbo-codemod"
when:
isAnyFilePathMatch: '^packages\/turbo-codemod\/.*$'
- label: "pkg: create-turbo"
when:
isAnyFilePathMatch: '^packages\/create-turbo\/.*$'
events:
onPublish:
turbo:
- runWorkflow: turborepo-smoke-published.yml
when: any
15 changes: 0 additions & 15 deletions .github/workflows/labeler.yml

This file was deleted.

0 comments on commit bdf2807

Please sign in to comment.