Skip to content

Conversation

@mpaulucci
Copy link
Collaborator

Motivation
Don't get those annoying "approve workflow" messages

Description

  • Adds pull_request_target so that the workflow runs in the base repo
  • Adds labeled/unlabeled that should fix the problems with the approve workflow

@mpaulucci mpaulucci requested a review from a team as a code owner October 23, 2025 17:38
Copilot AI review requested due to automatic review settings October 23, 2025 17:38
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 enhances GitHub workflow configuration to eliminate unnecessary approval prompts for forked PRs and improve workflow responsiveness to label changes.

Key Changes:

  • Switches pr_github_metadata.yaml from pull_request to pull_request_target trigger to run workflows in the base repository context
  • Adds labeled and unlabeled event types to pr_github_status_l1.yaml to respond to label changes
  • Introduces concurrency control to prevent multiple simultaneous workflow runs for the same PR

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
.github/workflows/pr_github_status_l1.yaml Adds label event triggers, concurrency control, and improves comment clarity
.github/workflows/pr_github_metadata.yaml Changes trigger to pull_request_target and removes fork check from label job

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

});
label-pr:
name: Set Labels
Copy link

Copilot AI Oct 23, 2025

Choose a reason for hiding this comment

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

Removing the fork check (if: github.event.pull_request.head.repo.fork == false) while using pull_request_target is dangerous. This allows forked PRs to execute workflows with access to repository secrets and write permissions, creating a potential security vulnerability where malicious code from forks could access sensitive resources.

Suggested change
name: Set Labels
name: Set Labels
if: github.event.pull_request.head.repo.fork == false

Copilot uses AI. Check for mistakes.
Copy link
Contributor

Choose a reason for hiding this comment

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

Does Copilot have a point here?


on:
pull_request:
pull_request_target:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you add a comment explaining why we use this instead of pull_request?

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.

4 participants