test: limit web diff coverage to current push range (#33523)

Co-authored-by: CodingOnStar <hanxujiang@dify.com>
This commit is contained in:
Coding On Star
2026-03-16 16:59:25 +08:00
committed by GitHub
parent 57d476d4e2
commit 0d72d99263
5 changed files with 24 additions and 4 deletions

View File

@ -3,6 +3,12 @@ import path from 'node:path'
const DIFF_COVERAGE_IGNORE_LINE_TOKEN = 'diff-coverage-ignore-line:'
export function buildGitDiffRevisionArgs(base, head, mode = 'merge-base') {
return mode === 'exact'
? [base, head]
: [`${base}...${head}`]
}
export function parseChangedLineMap(diff, isTrackedComponentSourceFile) {
const lineMap = new Map()
let currentFile = null