Repository navigation
Add title-prefix and labels validation to push-to-pull-request-branch safe output - #1068
Merged
Merged
Conversation
…anch safe output Co-authored-by: pelikhan <[email protected]>
Co-authored-by: pelikhan <[email protected]>
Copilot
AI
changed the title
Update the push-to-pull-request-branch safe output such that it supports
-
Add title-prefix and labels validation to push-to-pull-request-branch safe output
Sep 27, 2025
title-prefix field that specify a required title prefix for the pull request. Only pull requests with this prefix will be accepted. This field is optional
- labels field: a...
pelikhan
approved these changes
Sep 27, 2025
pelikhan
marked this pull request as ready for review
September 27, 2025 11:26
Collaborator
|
@copilot update documentation |
…le-prefix and labels validation Co-authored-by: pelikhan <[email protected]>
Contributor
Author
Updated the documentation in
Commit: 0912ce8 |
pelikhan
reviewed
Sep 27, 2025
| **Examples with different configurations:** | ||
|
|
||
| ```yaml | ||
| # Always succeed, warn when no changes (default behavior) |
Collaborator
There was a problem hiding this comment.
@copilot revert changes beyond here, do not modify existing example
Contributor
Author
There was a problem hiding this comment.
Reverted the additional examples while keeping the essential configuration documentation for title-prefix and labels fields. The original examples structure is now preserved exactly as it was.
Changes made:
- Kept configuration fields documentation (
title-prefixandlabels) - Kept the validation explanation section
- Kept updated safety features
- Removed the additional examples I had added
- Preserved all original examples and structure
Commit: e5f1885
…for title-prefix and labels Co-authored-by: pelikhan <[email protected]>
pelikhan
approved these changes
Sep 27, 2025
pelikhan
deleted the
copilot/fix-08753f9a-6c8e-4472-ad60-e1b1c585a840
branch
September 27, 2025 12:14
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.
Push-to-Pull-Request-Branch Title Prefix and Labels Support ✅
Successfully implemented support for
title-prefixandlabelsfields in thepush-to-pull-request-branchsafe output configuration.✅ Implementation Complete
PushToPullRequestBranchConfigstruct to includeTitlePrefixandLabelsfieldsparsePushToPullRequestBranchConfigto parse the new fields from YAMLbuildCreateOutputPushToPullRequestBranchJobto pass fields as environment variables✅ Features Added
title-prefixfield validates PR titles must start with specified prefixlabelsfield validates PR has all required labelsGITHUB_AW_PR_TITLE_PREFIXandGITHUB_AW_PR_LABELSto JavaScriptgh pr view --json headRefName,title,labelsto fetch PR details with safe null handling✅ Documentation Updated (Minimal Changes)
title-prefixandlabelsfields to the configuration reference✅ Testing
Usage Example
Both fields are optional and work independently or together. When specified, the workflow will validate the target PR meets the requirements before pushing changes.
Technical Implementation
(.labels // [] | map(.name))to handle null labels gracefullycreate-pull-requestsafe outputOriginal prompt
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.