Skip to content

[backports] allow maintain role in backport workflow permission checks - #21017

Merged
mrodm merged 1 commit into
elastic:mainfrom
mrodm:add_maintain_permission_for_backports
Sep 3, 2026
Merged

mrodm merged 1 commit into
elastic:mainfrom
mrodm:add_maintain_permission_for_backports

Conversation

@mrodm

@mrodm mrodm commented Sep 2, 2026 •

Copy link
Copy Markdown
Collaborator

Proposed commit message

chore: allow maintain role in backport workflow permission checks

The actor permission gate in `auto-backport` and `sync-backport-changelog`
workflows only accepted `write` and `admin` roles, inadvertently excluding
users with the `maintain` role.

GitHub's `maintain` role grants push access and the ability to manage PRs,
making it appropriate for triggering backport automation. This change adds
`maintain` to the accepted permission levels in both workflows.

Author's Checklist

  • Verified that maintain permission level includes push access in GitHub's permission model
  • Both affected workflows (auto-backport.yml, sync-backport-changelog.yml) updated consistently

Related issues


This PR was generated with the assistance of Claude (claude-sonnet-4-6).

Extend the actor permission gate in auto-backport and
sync-backport-changelog workflows to accept `maintain` in addition to
`write` and `admin`. Users with the maintain role have push access and
should be able to trigger backports.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@mrodm mrodm self-assigned this Sep 2, 2026
@mrodm
mrodm marked this pull request as ready for review September 2, 2026 11:26
@mrodm
mrodm requested a review from a team as a code owner September 2, 2026 11:26
Copilot AI lite review requested due to automatic review settings September 2, 2026 11:26
@mrodm mrodm changed the title chore: allow maintain role in backport workflow permission checks [backports] allow maintain role in backport workflow permission checks Sep 2, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The changes are small, consistent across both workflows, and correctly broaden the permission check to include maintain without altering workflow behavior otherwise.

Pull request overview

This PR updates the repository’s backport automation permission gate to allow collaborators with GitHub’s maintain role (in addition to write and admin) to trigger the auto-backport and sync-backport-changelog workflows.

Changes:

  • Expanded the actor permission check to accept maintain in both workflows.
  • Updated the skip log message to reflect the expanded accepted permission set.
File summaries
File Description
.github/workflows/auto-backport.yml Adds maintain to the allowed permission levels for the actor gate in the backport automation workflow.
.github/workflows/sync-backport-changelog.yml Adds maintain to the allowed permission levels for the actor gate in the changelog sync backport workflow.
Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@mergify

mergify Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

@mrodm
mrodm merged commit 83418ce into elastic:main Sep 3, 2026
9 checks passed
@mrodm
mrodm deleted the add_maintain_permission_for_backports branch September 3, 2026 09:22
mrodm added a commit to mrodm/integrations that referenced this pull request Sep 14, 2026
…ssion (elastic#21017)

- Replace second `mage applyBackport` with `backport apply` in the
  package owner synchronization section (missed in previous commit).
- Update /sync-changelog permission from "write access" to
  "write or maintain access" to match PR elastic#21017 (merged 2026-09-03).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants