feat: add generic first merged PR comment action - #172
Merged
Merged
Conversation
vitormattos
force-pushed
the
feat/first-merged-contribution-template
branch
from
September 23, 2026 18:37
54da0f3 to
babe5f3
Compare
Signed-off-by: Vitor Mattos <vitor@php.rio>
vitormattos
force-pushed
the
feat/first-merged-contribution-template
branch
from
September 23, 2026 18:38
8aa93b6 to
9065385
Compare
Signed-off-by: Vitor Mattos <vitor@php.rio>
Signed-off-by: Vitor Mattos <vitor@php.rio>
Signed-off-by: Vitor Mattos <vitor@php.rio>
… Vitor Mattos <vitor@php.rio>
…attos <vitor@php.rio>
…tor Mattos <vitor@php.rio>
… Mattos <vitor@php.rio>
…tos <vitor@php.rio>
…tos <vitor@php.rio>
…tos <vitor@php.rio>
…tos <vitor@php.rio>
…Vitor Mattos <vitor@php.rio>
…itor Mattos <vitor@php.rio>
…r Mattos <vitor@php.rio>
…os <vitor@php.rio>
…attos <vitor@php.rio>
…Mattos <vitor@php.rio>
…Vitor Mattos <vitor@php.rio>
…os <vitor@php.rio>
…tos <vitor@php.rio>
… Mattos <vitor@php.rio>
…y: Vitor Mattos <vitor@php.rio>
This was referenced Sep 23, 2026
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.
Summary
Adds a generic, tested
first-merged-pr-commentcomposite action and matching organization workflow template.The shared implementation is intentionally limited to:
Product-specific concepts such as surveys, community links, documentation URLs, labels, or project-specific destinations are not part of the action contract.
Message templating
Consumers configure the complete message through the repository variable:
FIRST_MERGED_PR_MESSAGEBuilt-in placeholders:
{server_url}{api_url}{repository}{repository_owner}{repository_name}{repository_url}{pull_request_number}{pull_request_url}{contributor_login}{contributor_mention}{contributor_url}{merge_commit_sha}Placeholders can be composed anywhere in the message, including complete URLs and query strings. The only supported filter in the initial contract is
|urlencode.Example:
The renderer performs textual substitution only. It does not evaluate shell, Python, JavaScript, GitHub expressions, Jinja, or other executable template syntax. Unknown placeholders and filters fail closed.
Security
pull_request_targetexecutes only trusted base-repository workflow code;permissions: {};pull-requests: write;This removes the previous dependency path that built
node:lts-buster-slimand reported vulnerable npm dependencies.Retry and idempotency
The workflow supports
workflow_dispatchwith a pull request number.First-merge detection is evaluated at the historical close time of the target pull request, so a retry remains correct even after later contributions. Successful comments receive an internal marker and are not duplicated by retries.
Tests
Adds focused tests for:
The repository CI also validates actionlint, zizmor, REUSE, workflow policy, and the complete Python test suite.
Signed-off-by: Vitor Mattos vitor@php.rio