Repository navigation
Description
Copilot agent
(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: trueThe 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.
Activity