Skip to content

chore: remove pull_request_target and use two workflows#992

Open
Yu-Jack wants to merge 1 commit intoharvester:mainfrom
Yu-Jack:HARV-RST-1411
Open

chore: remove pull_request_target and use two workflows#992
Yu-Jack wants to merge 1 commit intoharvester:mainfrom
Yu-Jack:HARV-RST-1411

Conversation

@Yu-Jack
Copy link
Collaborator

@Yu-Jack Yu-Jack commented Mar 20, 2026

This's for RST requirement to remove all pull_request_target. Use two steps workflows to achieve the goal with workflow event trigger.

  • First workflow saves all data we need in next workflow.
  • Second workflow can have the write permission to add the comment or change the assignee in the PR.

Test result:

PR: Yu-Jack#12
Comment: Yu-Jack#12 (comment)

Copilot AI review requested due to automatic review settings March 20, 2026 13:11
@Yu-Jack Yu-Jack requested review from Vicente-Cheng and ihcsim and removed request for akashraj4261, dariavladykina and jillian-maroket March 20, 2026 13:14
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR replaces the existing pull_request_target-based preview workflow with a two-workflow approach: a pull_request workflow that builds and uploads artifacts, and a workflow_run workflow that deploys and comments on the PR with elevated permissions.

Changes:

  • Switch .github/workflows/pull-request.yml from pull_request_target to pull_request, and move deployment/commenting out of the workflow.
  • Add .github/workflows/pull-request-deploy.yml triggered by workflow_run to download artifacts, deploy to Netlify, and update the PR comment.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 6 comments.

File Description
.github/workflows/pull-request.yml Builds the PR and uploads build + PR metadata as artifacts for a follow-up workflow.
.github/workflows/pull-request-deploy.yml On successful build completion, downloads artifacts, deploys to Netlify, and updates the PR comment with the preview link.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions
Copy link

github-actions bot commented Mar 20, 2026

Name Link
🔨 Latest commit d73a9f2
😎 Deploy Preview https://69bd4ac9410e4700e89d7e40--harvester-preview.netlify.app

Signed-off-by: Jack Yu <jack.yu@suse.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants