Skip to content

feat(workflow): enhance auto-labeling for closed PRs with version han…#126

Merged
LittleLittleCloud merged 1 commit intomainfrom
u/xiaoyun/autolabelpermission
Nov 16, 2025
Merged

feat(workflow): enhance auto-labeling for closed PRs with version han…#126
LittleLittleCloud merged 1 commit intomainfrom
u/xiaoyun/autolabelpermission

Conversation

@LittleLittleCloud
Copy link
Member

…dling and fork support

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 the auto-labeling workflow to improve handling of merged PRs from forks by switching from pull_request to pull_request_target trigger, updating GitHub API endpoint syntax, and adding better verification for milestone assignments.

Key Changes:

  • Switches workflow trigger from pull_request to pull_request_target to ensure proper permissions for fork PRs
  • Updates GitHub API endpoints from legacy :owner/:repo syntax to explicit ${{ github.repository }} references
  • Improves milestone assignment verification by checking the actual API response instead of relying on exit codes

Comment on lines +50 to +52
IS_FORK="false"
if [ "${{ github.event.pull_request.head.repo.full_name }}" != "${{ github.repository }}" ]; then
IS_FORK="true"
Copy link

Copilot AI Nov 16, 2025

Choose a reason for hiding this comment

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

The IS_FORK variable is set but never used in the subsequent logic. Either utilize this variable to conditionally handle fork PRs differently, or remove the variable and keep only the informational logging if fork detection is purely for diagnostic purposes.

Suggested change
IS_FORK="false"
if [ "${{ github.event.pull_request.head.repo.full_name }}" != "${{ github.repository }}" ]; then
IS_FORK="true"
if [ "${{ github.event.pull_request.head.repo.full_name }}" != "${{ github.repository }}" ]; then

Copilot uses AI. Check for mistakes.
@LittleLittleCloud LittleLittleCloud merged commit 0a86427 into main Nov 16, 2025
11 checks passed
@LittleLittleCloud LittleLittleCloud deleted the u/xiaoyun/autolabelpermission branch November 16, 2025 20:40
@github-actions github-actions bot added this to the v0.2.0 milestone Nov 16, 2025
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.

3 participants