mirror of
https://github.com/langgenius/dify.git
synced 2026-03-17 12:57:51 +08:00
test: limit web diff coverage to current push range (#33523)
Co-authored-by: CodingOnStar <hanxujiang@dify.com>
This commit is contained in:
@ -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
|
||||
|
||||
Reference in New Issue
Block a user