Skip to content

feat(close-prs): add composite action to close pull requests#710

Closed
jmeridth wants to merge 2 commits intochainguard-dev:mainfrom
jmeridth:jm_dev_114_create_composite_workflow_to_auto_close_pull_requests
Closed

feat(close-prs): add composite action to close pull requests#710
jmeridth wants to merge 2 commits intochainguard-dev:mainfrom
jmeridth:jm_dev_114_create_composite_workflow_to_auto_close_pull_requests

Conversation

@jmeridth
Copy link
Copy Markdown
Member

@jmeridth jmeridth commented Jan 29, 2026

Depends on #711

What

Add a new composite action that closes pull requests with a configurable comment message.

Why

Provides a reusable action for workflows that need to automatically close PRs. Example is for public repositories that are read-only (not currently taking or never will take contributions).

Notes

  • Only works in pull_request or pull_request_target triggered workflows
  • Validation fails fast with a clear error if PR_NUMBER is not available from the event context
  • will replace @main in README examples with SHA in quick-follow PR after this merges

## What

Add a new composite action that closes pull requests with a configurable comment message.

## Why

Provides a reusable action for workflows that need to automatically close PRs. Example is
for public repositories that are read-only (not currently taking or never will take contributions).

## Notes

- Only works in pull_request or pull_request_target triggered workflows
- Validation fails fast with a clear error if PR_NUMBER is not available from the event context

Signed-off-by: jmeridth <jmeridth@gmail.com>
@jmeridth jmeridth self-assigned this Jan 29, 2026
@jmeridth jmeridth requested a review from cpanato January 29, 2026 20:34
@jmeridth
Copy link
Copy Markdown
Member Author

#711 will fix the commit signing checks

@jmeridth jmeridth marked this pull request as draft February 3, 2026 20:34
@jmeridth
Copy link
Copy Markdown
Member Author

jmeridth commented Feb 3, 2026

Moving to draft so this can be discussed either this week or at the summit. Want to prevent accidental merge.

@jmeridth
Copy link
Copy Markdown
Member Author

This is no longer needed with https://github.blog/changelog/2026-02-13-new-repository-settings-for-configuring-pull-request-access/. We can close pull requests from settings now.

Kudos to @cpanato for finding this.

@jmeridth jmeridth closed this Feb 17, 2026
@jmeridth jmeridth deleted the jm_dev_114_create_composite_workflow_to_auto_close_pull_requests branch February 17, 2026 13:59
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