Skip to content

[Test/draft] Move to projectbot for automatic labeling of issues and PRs #621

[Test/draft] Move to projectbot for automatic labeling of issues and PRs

[Test/draft] Move to projectbot for automatic labeling of issues and PRs #621

Workflow file for this run

name: "Project Bot"
on:
issues:
types: [opened, edited, closed, reopened, labeled, unlabeled]
pull_request_target:
types: [opened, edited, closed, reopened, labeled, unlabeled, ready_for_review, converted_to_draft]
project_card:
types: [created, moved, deleted]
permissions:
contents: read
issues: write
pull-requests: write
repository-projects: write
jobs:
project_bot:
runs-on: ubuntu-latest
steps:
- name: Get token
id: get_token
uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a # v2.1.0
with:
app_id: ${{ secrets.OBS_AUTOMATION_APP_ID }}
private_key: ${{ secrets.OBS_AUTOMATION_APP_PEM }}
permissions: >-
{
"members": "read",
"organization_projects": "write",
"issues": "write",
"pull_requests": "write",
"repository_projects": "write"
}
- name: Run Project Bot
uses: philschatz/project-bot@v1
with:
github-token: ${{ steps.get_token.outputs.token }}
config-path: .github/project-bot.yml
- name: Add aws-λ-extension label
uses: github/issue-labeler@c1b0f9f52a63158c4adc09425e858e87b32e9685 # v3.4
with:
repo-token: "${{ steps.get_token.outputs.token }}"
configuration-path: .github/labeler-config.yml
enable-versioned-regex: 0
- name: Check team membership for user
uses: elastic/get-user-teams-membership@5fa8d08135326e44d74d0ec4ef8705d8e36df12d # 1.1.0
id: checkUserMember
with:
username: ${{ github.actor }}
team: 'observability'
usernamesToExclude: |
apmmachine
dependabot
GITHUB_TOKEN: ${{ steps.get_token.outputs.token }}
- name: Add community and triage labels
if: steps.checkUserMember.outputs.isTeamMember != 'true' && steps.checkUserMember.outputs.isExcluded != 'true'
uses: github/issue-labeler@c1b0f9f52a63158c4adc09425e858e87b32e9685 # v3.4
with:
repo-token: "${{ steps.get_token.outputs.token }}"
configuration-path: .github/community-label.yml
enable-versioned-regex: 0