Skip to content

[BUG] - SyntaxError in pr-labeler.yml causes "PR Auto Labeler" workflow to fail on every PR #39

Description

@Nonoka-T

🐛 Bug Report

Describe the Bug

The PR Auto Labeler / label-pr workflow fails on every pull request with SyntaxError: Unexpected token 'catch'. This means PRs never get automatically labeled.

Steps to Reproduce

Steps to reproduce the behavior:

  • Open any pull request
  • Check the PR Auto Labeler / label-pr workflow in GitHub Actions
  • See it fail immediately with a SyntaxError

Expected Behavior

The workflow should run successfully and add labels to the PR based on changed files.

Screenshots

If applicable, add screenshots to help explain your problem.

Image

Environment

N/A (gtihub actions workflow issue)

Additional Context

In .github/workflows/pr-labeler.yml, the script for detecting first time contributors appears to contain two different implementations that were accidentally merged together.
This leaves a catch block without a matching try block and the script also references two variables (prAuthor and authorPRs) that are never defined which causes the workflow to fail before it can run.

Possible Solution

Remove the duplicate code block and keep only one consistent implementation, wrapped in a proper try/catch with prAuthor correctly defined


Note: This issue will be automatically labeled and assigned to the appropriate team member for review. Thank you for helping improve our project! 🚀

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    Status
    Ready

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions