Skip to content

Conversation

@dkotter
Copy link
Collaborator

@dkotter dkotter commented Oct 28, 2025

Description of the Change

In #46 we added a GitHub Action workflow to add a Playground testing link to each PR description. There were a few issues with that and we fixed those in #49. In testing coming out of that merge, noticing a few more problems:

  1. The branch used to build the zip was still showing as trunk, even though we want it to build from the PR branch
  2. The final zip didn't include the vendor directory

For the first, in looking at the difference between using pull_request and pull_request_target as the triggering event, pull_request_target (which we were using) will always reference the PR base branch (typically trunk in our case) instead of the last commit to the PR branch itself.

I've adjusted that in this PR to use pull_request instead. I believe this is the proper event to use, especially based on this comment from GitHub:

This event allows your workflow to do things like label or comment on pull requests from forks. Avoid using this event if you need to build or run code from the pull request

For the second issue, I've adjusted our build script to ensure the vendor directory is included there but only include non-dev dependencies.

How to test the Change

Ensure the Playground link gets added properly to this PR description and that link works

Test using WordPress Playground

The changes in this pull request can be previewed and tested using this WordPress Playground instance:

Click here to test this pull request.

@dkotter dkotter added this to the 0.1.0 milestone Oct 28, 2025
@dkotter dkotter self-assigned this Oct 28, 2025
@github-actions
Copy link

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: dkotter <dkotter@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@codecov
Copy link

codecov bot commented Oct 28, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 48.48%. Comparing base (a5c7acc) to head (bd553e3).
⚠️ Report is 24 commits behind head on trunk.

Additional details and impacted files
@@            Coverage Diff            @@
##              trunk      #56   +/-   ##
=========================================
  Coverage     48.48%   48.48%           
  Complexity       45       45           
=========================================
  Files             6        6           
  Lines           198      198           
=========================================
  Hits             96       96           
  Misses          102      102           
Flag Coverage Δ
unit 48.48% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@dkotter dkotter changed the title Change the event the PR Comment workflow runs on WIP: Change the event the PR Comment workflow runs on Oct 28, 2025
@jeffpaul jeffpaul marked this pull request as draft October 29, 2025 02:28
@dkotter dkotter changed the title WIP: Change the event the PR Comment workflow runs on Change the event the PR Comment workflow runs on Oct 29, 2025
@dkotter dkotter marked this pull request as ready for review October 29, 2025 16:41
Copy link
Member

@jeffpaul jeffpaul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One small question on permissions, otherwise good to go

@jeffpaul jeffpaul moved this from In progress to Needs review in WordPress AI Planning & Roadmap Oct 29, 2025
@jeffpaul jeffpaul merged commit 0143b4a into WordPress:trunk Oct 29, 2025
49 of 51 checks passed
@github-project-automation github-project-automation bot moved this from Needs review to Done in WordPress AI Planning & Roadmap Oct 29, 2025
@dkotter dkotter deleted the fix/pr-comment-workflow branch October 29, 2025 22:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

2 participants