fix labeler + automaticaly add to GH project#4037
Merged
SylvainJuge merged 36 commits intoelastic:mainfrom Apr 9, 2025
Merged
Conversation
SylvainJuge
commented
Apr 4, 2025
.github/workflows/labeler.yml
Outdated
Comment on lines
20
to
24
| uses: AlexanderWert/issue-labeler@32be4a3c3d8f009c2741af471994337c34b4cb6f # v2.3 | ||
| with: | ||
| script: | | ||
| github.rest.issues.addLabels({ | ||
| issue_number: context.issue.number, | ||
| owner: context.repo.owner, | ||
| repo: context.repo.repo, | ||
| labels: ["agent-java"] | ||
| }) | ||
| repo-token: "${{ secrets.GITHUB_TOKEN }}" | ||
| configuration-path: .github/java-label.yml | ||
| enable-versioned-regex: 0 |
Member
Author
There was a problem hiding this comment.
[for reviewer] this part failed, so switching to the same pattern we have elsewhere for example in the android agent seem to work. Also, I wonder if we could/should replace the current version as it relies on Alex repository.
.github/workflows/labeler.yml
Outdated
Comment on lines
39
to
62
| - name: Check team membership for user | ||
| uses: elastic/get-user-teams-membership@1.1.0 | ||
| id: checkUserMember | ||
| with: | ||
| github-org: "elastic" | ||
| github-user: ${{ github.actor }} | ||
| github-token: ${{ steps.get_token.outputs.token }} | ||
| username: ${{ github.actor }} | ||
| team: 'apm' | ||
| usernamesToExclude: | | ||
| apmmachine | ||
| dependabot | ||
| dependabot[bot] | ||
| GITHUB_TOKEN: ${{ steps.get_token.outputs.token }} | ||
|
|
||
| - name: Show team membership | ||
| run: | | ||
| echo "::debug::isTeamMember: ${{ steps.checkUserMember.outputs.isTeamMember }}" | ||
| echo "::debug::isExcluded: ${{ steps.checkUserMember.outputs.isExcluded }}" | ||
|
|
||
| - name: Add community and triage labels | ||
| if: contains(steps.is_elastic_member.outputs.result, 'false') && github.actor != 'dependabot[bot]' && github.actor != 'elastic-renovate-prod[bot]' && github.actor != 'elastic-observability-automation[bot]' | ||
| uses: actions/github-script@v7 | ||
| if: steps.checkUserMember.outputs.isTeamMember != 'true' && steps.checkUserMember.outputs.isExcluded != 'true' | ||
| uses: AlexanderWert/issue-labeler@32be4a3c3d8f009c2741af471994337c34b4cb6f # v2.3 | ||
| with: | ||
| script: | | ||
| github.rest.issues.addLabels({ | ||
| issue_number: context.issue.number, | ||
| owner: context.repo.owner, | ||
| repo: context.repo.repo, | ||
| labels: ["community", "triage"] | ||
| }) | ||
| - name: Add comment for community PR | ||
| if: contains(steps.is_elastic_member.outputs.result, 'false') && github.actor != 'dependabot[bot]' && github.actor != 'elastic-renovate-prod[bot]' && github.actor != 'elastic-observability-automation[bot]' | ||
| uses: wow-actions/auto-comment@2fc064c21cfb2505de3c5c10e1473b8eb7beca1a # v1.1.2 | ||
| with: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| pullRequestOpened: | | ||
| 👋 @{{ author }} Thanks a lot for your contribution! | ||
|
|
||
| It may take some time before we review a PR, so even if you don’t see activity for some time, it **does not** mean that we have forgotten about it. | ||
|
|
||
| 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: contains(steps.is_elastic_member.outputs.result, 'true') && github.event.pull_request | ||
| repo-token: "${{ secrets.GITHUB_TOKEN }}" | ||
| configuration-path: .github/community-label.yml | ||
| enable-versioned-regex: 0 |
Member
Author
There was a problem hiding this comment.
[for reviewer] this part is a copy-paste from android agent repo.
Member
Author
|
draft PR to add those to global github actions and make it easier to reuse elastic/oblt-actions#260 |
SylvainJuge
commented
Apr 4, 2025
v1v
reviewed
Apr 9, 2025
v1v
approved these changes
Apr 9, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
agent-javalabelIn Progressstatus and in current iteration with something reusable across projects.Depends on elastic/oblt-actions#263 to be merged