Skip to content

Commit

Permalink
Maintainer approval check (opensearch-project#11378)
Browse files Browse the repository at this point in the history
Signed-off-by: Peter Nied <[email protected]>
Signed-off-by: Peter Nied <[email protected]>
  • Loading branch information
peternied authored Dec 7, 2023
1 parent 4ad2d4c commit 87b3011
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/maintainer-approval.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Maintainers approval

on:
pull_request_review:
types: [submitted]

jobs:
maintainer-approved-check:
name: Minimum approval count
runs-on: ubuntu-latest
steps:
- id: find-maintainers
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
result-encoding: string
script: |
// Get the collaborators - filtered to maintainer permissions
const maintainersResponse = await github.request('GET /repos/{owner}/{repo}/collaborators', {
owner: context.repo.owner,
repo: context.repo.repo,
permission: 'maintain',
affiliation: 'all',
per_page: 100
});
return maintainersResponse.data.map(item => item.login).join(', ');
- uses: peternied/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
min-required: 1
required-approvers-list: ${{ steps.find-maintainers.outputs.result }}
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- GHA to verify checklist items completion in PR descriptions ([#10800](https://github.com/opensearch-project/OpenSearch/pull/10800))
- Allow to pass the list settings through environment variables (like [], ["a", "b", "c"], ...) ([#10625](https://github.com/opensearch-project/OpenSearch/pull/10625))
- [Admission Control] Integrate CPU AC with ResourceUsageCollector and add CPU AC stats to nodes/stats ([#10887](https://github.com/opensearch-project/OpenSearch/pull/10887))
- Maintainer approval check ([#11378](https://github.com/opensearch-project/OpenSearch/pull/11378))

### Dependencies
- Bump `log4j-core` from 2.18.0 to 2.19.0
Expand Down

0 comments on commit 87b3011

Please sign in to comment.