Skip to content

PR labeler not using configuration file on forks #81

@jvgreiner

Description

@jvgreiner

We are currently using the default setup for pr-labeler with the exception of using (pull_request_target).

here is the file

on:
  pull_request_target:
    types: [opened]

permissions:
  contents: read

jobs:
  pr-labeler:
    permissions:
      contents: read
      pull-requests: write
    runs-on: ubuntu-latest
    steps:
      - uses: TimonVS/pr-labeler-action@v4
        with:
          repo-token: ${{ secrets.GITHUB_TOKEN }}
          configuration-path: .github/pr-labeler.yml

and the config file located in root of .github is this file

master: ['hotfix/*', 'release/*', 'dev/*']
external-dependency: ['combined/*', 'combined-dependabot/*']
dev: ['feature/*', 'feat/*']

When a fork PR is opened the workflow runs but creates a label from the branch name and not the label configured.
Ex - branch name "feature/what-ever" is creating a label "feature" and should be creating the label "dev" instead.

Also a separate question for pr-labeler and reusable-workflows.

Is there an option to have everything for pr-labeler to reside in one file and move the configuration "labels" in to the workflow itself to make it easier to re-use the workflow. Having issues along the same here on normal pull requests and the configuration-path is not getting pulled in and skipping, then creating a label base on the open branch name.

Thanks for any insight here, we use the pr-labeler in 34 repositories

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions