Files
orca/src/main/github/github-read-execution-scope.ts
T
OrcaWinandOrcaWin 0a5f9e9dc5 fix: keep identifier casing locale-independent (Turkish) (#34709)
* fix: keep identifier casing locale-independent (Turkish)

Under a tr/az default locale, toLocaleLowerCase()/toLocaleUpperCase() map
I to dotless ı and İ, and default-locale collation stops treating I/i as
base-equal. Switch identifier matching (Linear CLI selectors, priorities,
error classification, plugin/Jira/worktree/address/slash-command search) to
toLowerCase()/toUpperCase(), and pin collation to 'en' where ordering feeds
hashes, canonical JSON, semver precedence, remote selection, SSH Include
order, or WSL distro equality. User-visible prose casing and display-list
sorting stay locale-aware.

* fix: order SSH Include globs bytewise and fold dashboard search ids locale-independently

---------

Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-10-27 22:47:01 -07:00

20 lines
657 B
TypeScript

import { createHash } from 'node:crypto'
import type { GitHubRepoExecOptions } from './github-api-repository'
export function githubReadExecutionScope(
options: GitHubRepoExecOptions,
environment: NodeJS.ProcessEnv = options.env ?? process.env
): string {
const { admissionTier: _admissionTier, ...executionOptions } = options
// gh wrappers and credential selection can depend on cwd and the inherited environment.
return createHash('sha256')
.update(
JSON.stringify([
executionOptions,
process.cwd(),
Object.entries(environment).sort(([a], [b]) => a.localeCompare(b, 'en'))
])
)
.digest('hex')
}