diff --git a/.github/scripts/automerge.py b/.github/scripts/automerge.py index d8c9575756..b3428aee8b 100644 --- a/.github/scripts/automerge.py +++ b/.github/scripts/automerge.py @@ -18,14 +18,13 @@ g = Github(os.getenv("GITHUB_TOKEN")) repo = g.get_repo(os.getenv("GITHUB_REPOSITORY")) -maintainers = [m.strip() for m in os.getenv("MAINTAINERS").split(',')] def fetch_pulls(mergeable_state): return [pr for pr in repo.get_pulls(state='open', sort='created') \ if pr.mergeable_state == mergeable_state and 'auto-merge' in [l.name for l in pr.labels]] def is_approved(pr): - approvers = [r.user.login for r in pr.get_reviews() if r.state == 'APPROVED' and r.user.login in maintainers] + approvers = [r.user.login for r in pr.get_reviews() if r.state == 'APPROVED'] return len([a for a in approvers if repo.get_collaborator_permission(a) in ['admin', 'write']]) > 0 # First, find a PR that can be merged diff --git a/.github/workflows/automerge-bot.yml b/.github/workflows/automerge-bot.yml index 2ff0c795cc..b2a301156a 100644 --- a/.github/workflows/automerge-bot.yml +++ b/.github/workflows/automerge-bot.yml @@ -27,6 +27,5 @@ jobs: run: pip install PyGithub - name: Automerge and update env: - MAINTAINERS: artursouza,mukundansundar GITHUB_TOKEN: ${{ secrets.DAPR_BOT_TOKEN }} run: python ./.github/scripts/automerge.py