Conversation
📝 Walkthrough## Walkthrough
This pull request updates two GitHub workflow files. In the bump-version workflow, the processing of the `PARSELY_RELEASE_LOG` variable has been enhanced by appending a `sed` command to remove leading whitespace. Additionally, the `gh pr create` command now includes a `--milestone` parameter to associate the pull request with the new version's milestone. In the release-plugin workflow, changes improve error handling for tag deletions by clarifying comments and adding a command to remove remote tags if they exist.
## Changes
| File | Change Summary |
|---------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `.github/workflows/bump-version.yml` | Modified the processing of `PARSELY_RELEASE_LOG` to strip leading whitespace using an additional `sed` command; added `--milestone ${{ env.NEW_VERSION }}` to the `gh pr create` command. |
| `.github/workflows/release-plugin.yml` | Enhanced error handling by updating comments and adding the command `git push --delete origin ":refs/tags/${TAG_NAME}" || true` to ensure deletion of remote tags. |
| `src/content-helper/editor-sidebar/class-editor-sidebar.php` | Updated PHPDoc annotation for `$post` variable to `WP_Post|null` and added explicit null check before calling `Dashboard_Link::can_show_link` in `get_parsely_post_url` method. |
## Sequence Diagram(s)
```mermaid
sequenceDiagram
participant Runner as GitHub Workflow Runner
participant Env as Environment Variables
participant Bump as Bump-Version Script
participant GH as GitHub CLI
Runner->>Bump: Trigger bump version workflow
Bump->>Env: Retrieve PARSELY_RELEASE_LOG
Bump->>Bump: Apply sed to remove leading whitespace
Bump->>GH: Execute "gh pr create" with --milestone parameter
GH-->>Bump: Pull request created with milestonesequenceDiagram
participant Runner as GitHub Workflow Runner
participant Git as Git Commands
participant Remote as Remote Repository
Runner->>Git: Check for existing tag locally and remotely
Git->>Git: Delete local tag if it exists
Git->>Remote: Execute "git push --delete origin ':refs/tags/${TAG_NAME}'" to delete remote tag
Remote-->>Git: Confirm tag deletion or return error status
Git-->>Runner: Tag deletion outcome handled (errors suppressed)
Possibly related issues
Possibly related PRs
Suggested labels
Suggested reviewers
This change adds defensive programming that correctly handles the scenario where ✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
…into fix/release-workflow
|
@acicovic Howdy! This is ready for review. For now, I'm focusing on the top 5 items and ignoring the nice-to-haves. There are a couple that I haven't completed that I'd like feedback on:
I found a couple of ways to accomplish this:
I haven't implemented either yet, but if we want to go ahead with this I think a bot account makes the most sense. Does that sound good to you, or do you think we should keep things as-is?
We use |
|
@alecgeatches, thank you for your work. I'll share with you internally all the context I've got about the workflow run. I'm unsure it will shed light to your questions though. To be more specific to the questions at hand:
I agree.
Unfortunately I don't, and I'm unsure what would cause this. I can see that To conclude, from my understanding none of these are blocking. Thus, we could make our next release without these and see if any of them cause enough friction for us to consider fixing them for v3.19 if there's bandwidth. |
|
Thank you @acicovic! I'll commit as-is for now, and we can evaluate if we want the bot changes and understand the published release problem again. |
…rove release workflow" (1bc19a2)
Description
Addresses the release workflow issues outlined in #2938:
### Added)Nice to have / Improvements
Per discussion, we're skipping these items on this PR.
When running the release workflow without dry-run set, it might optionally attempt to remove any old release and tag created by the dry-run execution.When theUpdate version number and changelog for x.x.x releasePR is merged, maybe trigger automatically an action that creates aRelease wp-parsely x.x.xPR that mergesdevelopintotrunk.After the release, automatically create aMerge trunk into develop after the wp-parsely x.x.x releasePR.How has this been tested?
Summary by CodeRabbit