-
Notifications
You must be signed in to change notification settings - Fork 976
40 lines (33 loc) · 1.12 KB
/
autogenerated_labeler.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# **what?**
# Labels issues autogenerated in dbt-core
# **why?**
# To organize autogenerated issues from dbt-core to make it easier to find and track them.
# **when?**
# When an issue is opened by the FishtownBuildBot
name: Add Labels to Autogenerated Issues
on:
issues:
types: [opened]
jobs:
add_customized_labels:
if: github.event.issue.user.login == 'FishtownBuildBot'
permissions:
issues: write
runs-on: ubuntu-latest
steps:
- name: "Determine appropriate labels by repo in title"
id: repo
env:
ISSUE_TITLE: ${{ github.event.issue.title }}
run: |
if [[ "$ISSUE_TITLE" == *"dbt-core"* ]]; then
echo "labels='content,improvement,dbt Core'" >> $GITHUB_OUTPUT
else
echo "labels='content,improvement,adapters'" >> $GITHUB_OUTPUT
fi
- name: "Add Labels to autogenerated Issues"
id: add-labels
run: |
gh issue edit ${{ github.event.issue.number }} --repo ${{ github.repository }} --add-label ${{ steps.repo.outputs.labels }}
env:
GH_TOKEN: ${{ secrets.DOCS_SECRET }}