Merge pull request #75 from tunnckoCore/feat/disable-coauthor-and-openclaude-pr-branding
feat: support disabling commit co-author attribution
This commit is contained in:
@@ -1,11 +1,8 @@
|
||||
import { feature } from 'bun:bundle'
|
||||
import { stat } from 'fs/promises'
|
||||
import { getClientType } from '../bootstrap/state.js'
|
||||
import {
|
||||
getRemoteSessionUrl,
|
||||
isRemoteSessionLocal,
|
||||
PRODUCT_URL,
|
||||
} from '../constants/product.js'
|
||||
import { getRemoteSessionUrl, isRemoteSessionLocal } from '../constants/product.js'
|
||||
import { isEnvTruthy } from './envUtils.js'
|
||||
import { TERMINAL_OUTPUT_TAGS } from '../constants/xml.js'
|
||||
import type { AppState } from '../state/AppState.js'
|
||||
import { FILE_EDIT_TOOL_NAME } from '../tools/FileEditTool/constants.js'
|
||||
@@ -76,8 +73,13 @@ export function getAttributionTexts(): AttributionTexts {
|
||||
isInternalModelRepoCached() || isKnownPublicModel
|
||||
? getPublicModelName(model)
|
||||
: 'Claude Opus 4.6'
|
||||
const defaultAttribution = `🤖 Generated with [Claude Code](${PRODUCT_URL})`
|
||||
const defaultCommit = `Co-Authored-By: ${modelName} <noreply@anthropic.com>`
|
||||
const defaultAttribution =
|
||||
'🤖 Generated with [OpenClaude](https://github.com/Gitlawb/openclaude)'
|
||||
const defaultCommit = isEnvTruthy(
|
||||
process.env.OPENCLAUDE_DISABLE_CO_AUTHORED_BY,
|
||||
)
|
||||
? ''
|
||||
: `Co-Authored-By: ${modelName} <noreply@anthropic.com>`
|
||||
|
||||
const settings = getInitialSettings()
|
||||
|
||||
@@ -325,7 +327,8 @@ export async function getEnhancedPRAttribution(
|
||||
return ''
|
||||
}
|
||||
|
||||
const defaultAttribution = `🤖 Generated with [Claude Code](${PRODUCT_URL})`
|
||||
const defaultAttribution =
|
||||
'🤖 Generated with [OpenClaude](https://github.com/Gitlawb/openclaude)'
|
||||
|
||||
// Get AppState first
|
||||
const appState = getAppState()
|
||||
@@ -371,7 +374,7 @@ export async function getEnhancedPRAttribution(
|
||||
memoryAccessCount > 0
|
||||
? `, ${memoryAccessCount} ${memoryAccessCount === 1 ? 'memory' : 'memories'} recalled`
|
||||
: ''
|
||||
const summary = `🤖 Generated with [Claude Code](${PRODUCT_URL}) (${claudePercent}% ${promptCount}-shotted by ${shortModelName}${memSuffix})`
|
||||
const summary = `🤖 Generated with [OpenClaude](https://github.com/Gitlawb/openclaude) (${claudePercent}% ${promptCount}-shotted by ${shortModelName}${memSuffix})`
|
||||
|
||||
// Append trailer lines for squash-merge survival. Only for allowlisted repos
|
||||
// (INTERNAL_MODEL_REPOS) and only in builds with COMMIT_ATTRIBUTION enabled —
|
||||
|
||||
Reference in New Issue
Block a user