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

Update team member check #3519

Merged
merged 1 commit into from
Feb 8, 2024
Merged
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
24 changes: 7 additions & 17 deletions .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,23 +21,13 @@ jobs:
repo: context.repo.repo,
labels: ["agent-java"]
})
- name: Check team membership for user
uses: elastic/[email protected]
id: checkUserMember
- id: is_elastic_member
uses: elastic/apm-pipeline-library/.github/actions/is-member-elastic-org@current
with:
username: ${{ github.actor }}
team: 'apm'
usernamesToExclude: |
apmmachine
dependabot
dependabot[bot]
GITHUB_TOKEN: ${{ secrets.APM_TECH_USER_TOKEN }}
- name: Show team membership
run: |
echo "::debug::isTeamMember: ${{ steps.checkUserMember.outputs.isTeamMember }}"
echo "::debug::isExcluded: ${{ steps.checkUserMember.outputs.isExcluded }}"
username: ${{ github.event.issue.user.login }}
token: ${{ secrets.APM_TECH_USER_TOKEN }}
- name: Add community and triage lables
if: steps.checkUserMember.outputs.isTeamMember != 'true' && steps.checkUserMember.outputs.isExcluded != 'true'
if: steps.is_elastic_member.outputs.result != true
uses: actions/github-script@v7
with:
script: |
Expand All @@ -48,7 +38,7 @@ jobs:
labels: ["community", "triage"]
})
- name: Add comment for community PR
if: steps.checkUserMember.outputs.isTeamMember != 'true' && steps.checkUserMember.outputs.isExcluded != 'true'
if: steps.is_elastic_member.outputs.result != true
uses: wow-actions/auto-comment@v1
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -60,7 +50,7 @@ jobs:
Every once in a while we go through a process of prioritization, after which we are focussing on the tasks that were planned for the upcoming [milestone](https://github.com/elastic/apm-agent-java/milestones). The prioritization status is typically reflected through the PR labels. It could be pending triage, a candidate for a future milestone, or have a target milestone set to it.
- name: Assign new internal pull requests to project
uses: elastic/[email protected]
if: (steps.checkUserMember.outputs.isTeamMember == 'true' || steps.checkUserMember.outputs.isExcluded == 'true') && github.event.pull_request
if: (steps.is_elastic_member.outputs.result == true) && github.event.pull_request
with:
project: 'https://github.com/orgs/elastic/projects/454'
project_id: '5882982'
Expand Down
Loading