Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR introduces a reusable workflow for creating pull requests that addresses GitHub Actions' limitations where workflows created by other workflows don't trigger expected events. The workflow is triggered when the 'Newfold Prepare Release' workflow completes and creates a pull request using a reusable workflow from the newfold-labs organization.
Key changes:
- Creates a new GitHub Actions workflow triggered by workflow_run events
- Implements concurrency control to prevent multiple simultaneous runs
- Calls a reusable workflow to handle the actual pull request creation
Comments suppressed due to low confidence (1)
.github/workflows/create-pull-request.yml:25
- [nitpick] The job name 'prep-release' doesn't accurately reflect its purpose of creating a pull request. Consider renaming to 'create-pr' or 'create-pull-request' to match the actual functionality.
prep-release:
| base-branch: ${{ github.event.workflow_run.inputs.target-branch }} | ||
| head-branch: ${{ github.event.workflow_run.inputs.source-branch }} |
There was a problem hiding this comment.
The workflow_run event context doesn't have an 'inputs' property. For workflow_run events, you should use '${{ github.event.workflow_run.head_branch }}' for the head branch and specify the base branch directly or use workflow_run conclusion data.
| base-branch: ${{ github.event.workflow_run.inputs.target-branch }} | |
| head-branch: ${{ github.event.workflow_run.inputs.source-branch }} | |
| base-branch: main | |
| head-branch: ${{ github.event.workflow_run.head_branch }} |
| base-branch: ${{ github.event.workflow_run.inputs.target-branch }} | ||
| head-branch: ${{ github.event.workflow_run.inputs.source-branch }} |
There was a problem hiding this comment.
The workflow_run event context doesn't have an 'inputs' property. Use '${{ github.event.workflow_run.head_branch }}' to get the branch that triggered the workflow run.
| base-branch: ${{ github.event.workflow_run.inputs.target-branch }} | |
| head-branch: ${{ github.event.workflow_run.inputs.source-branch }} | |
| base-branch: main | |
| head-branch: ${{ github.event.workflow_run.head_branch }} |
| base-branch: ${{ github.event.workflow_run.inputs.target-branch }} | ||
| head-branch: ${{ github.event.workflow_run.inputs.source-branch }} | ||
| workflow-id: ${{ github.event.workflow_run.id }} | ||
| pr-title: 'Need to figure out how to pass this along.' |
There was a problem hiding this comment.
The hardcoded placeholder title should be replaced with a dynamic value or proper configuration. Consider using workflow_run metadata like '${{ github.event.workflow_run.display_title }}' or constructing a meaningful title.
| pr-title: 'Need to figure out how to pass this along.' | |
| pr-title: ${{ github.event.workflow_run.display_title }} |
|
@desrosj - are you still working on this or do you still need this PR open? |
I'm not actively working on this, no. Whether it needs to stay open depends on if we think something like newfold-labs/workflows#74 is worth spending the time pursuing. |
DO NOT MERGE. THIS IS A PROOF OF CONCEPT.
Proposed changes
This explores how to address the fact that GitHub Action workflows created by other workflows do not trigger the expected events because of intentionally limited capabilities.
Type of Change
Production
Development
Visual
Checklist
Further comments