Skip to content

create-issue: allow limiting title-deduplication searches with additional query qualifiers #73008

Closed

Description

@jeremymeng

Copilot agent :copilot: (on behalf of @jeremymeng):

Request

Could safe-outputs.create-issue offer an option to restrict the candidate search used by deduplicate-by-title, for example with additional GitHub search qualifiers such as label:documentation label:automated?

The configured issue labels currently control labels applied at creation, but do not narrow the title-deduplication search. A configurable search scope would let workflows avoid scanning unrelated repository issues without replacing the built-in safe-output handler.

Observed behavior

Our Documentation Consistency Check run uses:

safe-outputs:
  create-issue:
    title-prefix: "[docs-consistency-check] "
    labels: [documentation, automated]
    deduplicate-by-title: true

The safe-output job reported:

Title dedup search (open issues) truncated for Azure/azure-sdk-for-js: fetched 200 of 508 results (cap 2 pages)

The handler pinned by that run searches all open issues in the repository, plus issues closed within the previous 30 days:

repo:Azure/azure-sdk-for-js is:issue is:open
repo:Azure/azure-sdk-for-js is:issue is:closed closed:>=<date>

Neither query includes the configured labels or title prefix. The same broad queries are also present in the runtime currently pinned by our workflow.

In the observed run, deduplication did find a matching title and correctly skipped creation. The concern is the unnecessarily broad, truncated candidate search, which can miss matches outside the fetched pages—not the duplicate suppression itself.

Suggested behavior

Allow workflow authors to supply additional qualifiers for both the open and recently closed candidate searches. For this workflow, the resulting queries would be:

repo:Azure/azure-sdk-for-js is:issue is:open label:documentation label:automated
repo:Azure/azure-sdk-for-js is:issue is:closed closed:>=<date> label:documentation label:automated

Both labels should be required (AND). The option could be an additional-query setting or a dedicated label filter; the name and configuration shape are open for discussion. Existing title matching, the recently closed window, and repository boundaries should remain intact, with current behavior preserved when the option is omitted.

on.skip-if-match would not be equivalent here: we still want each scheduled documentation check to run and potentially produce fixes, while narrowing only the fallback issue's deduplication search.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions