Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

Commit 1b68de0

Browse files
committed
batches: make repo exclusion exact
1 parent d9c9fa8 commit 1b68de0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

client/web/src/enterprise/batches/batch-spec/yaml-util.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ const appendExcludeRepoToQuery = (spec: string, ast: YAMLMap, repo: string): YAM
8181
const isQuoted = queryValue.doubleQuoted || queryValue.singleQuoted || false
8282

8383
// If the value is not quoted, we need to escape characters
84-
const excludeQualifierString = isQuoted ? ` -repo:${repo}` : ` -repo:${escapeRegExp(repo)}`
84+
const excludeQualifierString = isQuoted ? ` -repo:^${repo}$` : ` -repo:^${escapeRegExp(repo)}$`
8585
// If the value is quoted, we also need to shift the slice position so that the string
8686
// is inserted inside of the quotes
8787
const slicePosition = isQuoted ? queryValue.endPosition - 1 : queryValue.endPosition

0 commit comments

Comments
 (0)