72e6b46cde
- Branding: default app name MokoGitea -> MokoGIT; all standalone 'MokoGitea' brand strings, comments, and copyright headers -> MokoGIT - Special repo/config names: .mokogitea/.mokogitea-private -> .mokogit/ .mokogit-private (workflow discovery, issue/PR templates, profile+wiki repo names in header.go, config dir renamed) - Lowercase: mokogitea -> mokogit (docker image refs, ntfy topic, mail tags, wiki docs, Joomla element/targetplatform, MCP package docs) - Actions system user mokogitea-actions -> mokogit-actions + DB migration #369 to rename the existing id=-2 user in place - Icon: bundle Moko favicon.svg as public/assets/img/{favicon,logo}.svg; wire PWA manifest (SiteManifest) + nav logo to the SVG - CHANGELOG entry documenting the rebrand Shared MOKOGITEA_* CI/compose env + org-secret names are intentionally left for the coordinated server cutover to avoid breaking cross-repo CI. Claude-Session: https://claude.ai/code/session_01Bqe7fAuHQeiLueYfeHFrHw
32 lines
795 B
Go
32 lines
795 B
Go
// Copyright 2021 The Gitea Authors. All rights reserved.
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
package analyze
|
|
|
|
import (
|
|
"path"
|
|
"strings"
|
|
|
|
"github.com/go-enry/go-enry/v2"
|
|
)
|
|
|
|
// IsVendor returns whether the path is a vendor path.
|
|
// It uses go-enry's IsVendor function but overrides its detection for certain
|
|
// special cases that shouldn't be marked as vendored in the diff view.
|
|
func IsVendor(treePath string) bool {
|
|
if !enry.IsVendor(treePath) {
|
|
return false
|
|
}
|
|
|
|
// Override detection for single files
|
|
basename := path.Base(treePath)
|
|
switch basename {
|
|
case ".gitignore", ".gitattributes", ".gitmodules":
|
|
return false
|
|
}
|
|
if strings.HasPrefix(treePath, ".github/") || strings.HasPrefix(treePath, ".gitea/") || strings.HasPrefix(treePath, ".mokogit/") {
|
|
return false
|
|
}
|
|
return true
|
|
}
|