What’s New
This release focuses on refactoring, stability, and adherence to best practices within the PR Creator Action, without altering the public interface (inputs/outputs).
Key enhancements include:
- Improved Script Robustness: Implemented
set -o pipefailfor enhanced error handling within shell pipelines, preventing silent failures and ensuring better reliability. - Enhanced Parameter Validation: Added more informative and explicit error messages when required input parameters (like
title,source_branch, etc.) are missing, significantly improving the developer experience. - Best Practice Adoption: Updated the script shebang to use
#!/usr/bin/env bashfor better portability across different environments. - Code Clarity: Renamed the core script from
create-pr.shtopr-creator.shto provide a clearer description of its function. - Documentation: Updated documentation to reflect the internal changes and usage of the new script name.
Usage Example
The usage remains identical to v1, ensuring a seamless upgrade:
- uses: ws2git/gh-pr-creator-action@v1.1
env:
GH_TOKEN: ${{ github.token }}
with:
title: "Automated PR: feature/test to develop"
body: "This Pull Request was created automatically using the PR Creator Action."
source_branch: "feature/test"
dest_branch: "develop"Requirements
The core requirements are unchanged:
- The GitHub CLI (gh) must be available in the runner environment (Ubuntu runners already include it).
- The workflow must set the
GH_TOKENenvironment variable for authentication (use${{ github.token }}). - Both source and destination branches must exist in the repository.
Thank you for using and sharing feedback to improve this action!