Skip to content

Add GH app for repos with branch protections#7

Open
alexcams wants to merge 1 commit into
logstash-plugins:mainfrom
alexcams:use-GH-App-for-commit
Open

Add GH app for repos with branch protections#7
alexcams wants to merge 1 commit into
logstash-plugins:mainfrom
alexcams:use-GH-App-for-commit

Conversation

@alexcams
Copy link
Copy Markdown
Contributor

@alexcams alexcams commented May 29, 2026

  • enhancement

Release notes

[rn:skip]

What does this PR do?

Adds GitHub App token support to the pr-prepare.yml reusable workflow. When the calling repository provides CLIENT_ID and APP_PRIVATE_KEY secrets, the workflow generates an ephemeral GitHub App installation token and uses it for all Git operations (fetching files, creating blobs, committing, pushing). The token is revoked after workflow execution. If the secrets are not provided, the workflow falls back to the default GITHUB_TOKEN.

Related Issues

#7885

Tests

The GitHub App hasn't been created in logstash-plugins org, it will be done after reach an agreement about this solution.
Example workflow job run with the GH App installed in my fork. Successfully committed to a protected branch using the App token. Commit

@alexcams alexcams marked this pull request as draft May 29, 2026 10:53
@alexcams alexcams marked this pull request as ready for review June 2, 2026 19:12
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.

1 participant