diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml index 19963ddd5b..054cff2143 100644 --- a/.github/workflows/labeler.yml +++ b/.github/workflows/labeler.yml @@ -21,23 +21,13 @@ jobs: repo: context.repo.repo, labels: ["agent-java"] }) - - name: Check team membership for user - uses: elastic/get-user-teams-membership@1.1.0 - 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: | @@ -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 }} @@ -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/assign-one-project-github-action@1.2.2 - 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'