Feature request: top-level `ignore` list for files that should never trigger labels

Open
#965 1 comment 0 reactions 0 assignees View on GitHub

@janhoy is already working on this.

Since Aug 7, 2026.

  • #966 by @janhoy — open

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
55/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Quiet
Tech stack
github-actions, typescript
Domain
devops

Research direction

Start by tracing how the action builds its changed-files set, loads the top-level configuration, and evaluates per-rule globs and negations. Add a top-level ignore list whose matching files are removed before any label rule runs, then verify that lock-file-only changes no longer trigger directory-based labels while unrelated files still do.

Written by the indexing model from the issue text.

Description

feature request

Description

Add a top-level ignore key (a list of globs) whose matches are removed from the changed-files set before any label rule is evaluated, so those files can never, on their own, cause a label to be applied.

This is different from the existing per-rule ! negation: negation has to be repeated inside every rule and is evaluated per-rule, so it can't express "these files should never matter to any label" in a single place.

Justification

Lock files are the motivating case. A dependency bump can rewrite many lock files (gradle.lockfile, package-lock.json, poetry.lock, ...) scattered across per-module directories, without touching any real source. With directory-based rules like:

module-foo:
  - changed-files:
      - any-glob-to-any-file:
          - modules/foo/**

every module whose lock file changed gets labeled as if its source were modified. Excluding lock files inside each rule is verbose and easy to forget whenever a new rule is added. A single top-level ignore list would solve it once:

ignore:
  - '**/*.lock'
  - '**/gradle.lockfile'

Are you willing to submit a PR?

Possibly, if the approach is agreed.

Dominant language
TypeScript
Stars
2.5k
Forks
488
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from actions/labeler

All issues in actions/labeler

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.