2021-07-12 08:33:02 +00:00
|
|
|
---
|
|
|
|
name: "Metadata: Label issues and pull requests"
|
|
|
|
|
|
|
|
on:
|
|
|
|
issues:
|
|
|
|
types:
|
|
|
|
- opened
|
|
|
|
- edited
|
|
|
|
- closed
|
|
|
|
- reopened
|
2021-07-21 19:47:51 +00:00
|
|
|
pull_request_target:
|
2021-07-12 08:33:02 +00:00
|
|
|
types:
|
|
|
|
- opened
|
|
|
|
- edited
|
|
|
|
- closed
|
|
|
|
- reopened
|
|
|
|
- ready_for_review
|
|
|
|
- synchronize
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
label:
|
|
|
|
name: Label issues and pull requests
|
|
|
|
runs-on: ubuntu-20.04
|
|
|
|
steps:
|
|
|
|
- uses: getsentry/action-github-app-token@v1
|
|
|
|
id: get-app-token
|
|
|
|
with:
|
|
|
|
app_id: ${{ secrets.K8S_AT_HOME_APP_ID }}
|
|
|
|
private_key: ${{ secrets.K8S_AT_HOME_APP_PRIVATE_KEY }}
|
|
|
|
|
2021-07-21 19:47:51 +00:00
|
|
|
- uses: Videndum/label-mastermind@2.1.1
|
2021-07-12 08:33:02 +00:00
|
|
|
with:
|
2021-07-24 07:21:09 +00:00
|
|
|
GITHUB_TOKEN: ${{ steps.get-app-token.outputs.token }}
|
2021-07-21 19:47:51 +00:00
|
|
|
configJSON: |
|
|
|
|
"labels": {
|
|
|
|
"kind:incorrect-title": {
|
|
|
|
"name": "kind:incorrect-title",
|
|
|
|
"colour": "#ffb700",
|
|
|
|
"description": "Incorrect title"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"runners": [
|
|
|
|
{
|
|
|
|
"root": ".",
|
|
|
|
"versioning": {
|
|
|
|
"source": "milestones",
|
|
|
|
"type": "other"
|
|
|
|
},
|
|
|
|
"pr": {
|
|
|
|
"labels": {
|
|
|
|
"kind:incorrect-title": {
|
|
|
|
"requires": 2,
|
|
|
|
"conditions": [
|
|
|
|
{
|
|
|
|
"type": "creatorMatches",
|
|
|
|
"pattern": "^(?!renovate).+"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "titleMatches",
|
|
|
|
"pattern": "^(?!\\[[a-z0-9]+\\]\\s[A-Z0-9].+).+"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|