Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/bot-detection.md
Original file line number Diff line number Diff line change
Expand Up @@ -903,7 +903,7 @@ This workflow enforces determinism via a **precompute job**.
- PR touches sensitive paths (any changed file matches):
- `.github/workflows/` or `.github/actions/`: `+15`
- `Dockerfile`, `Makefile`, `scripts/`, `actions/`: `+10`
- dependency manifests/lockfiles (`package.json`, `package-lock.json`, `pnpm-lock.yaml`, `yarn.lock`, `go.mod`, `go.sum`, `requirements*.txt`): `+6`
- dependency manifests/lockfiles (`package.json`, `package-lock.json`, `pnpm-lock.yaml`, `yarn.lock`, `go.mod`, `go.sum`, `requirements*.txt`, `*.csproj`, `Directory.Packages.props`): `+6`
- Burst behavior: `+6` if the account authored `>= 5` issues/PRs in the window.
- Near-duplicate content: `+8` if the account posted the same (or obviously templated) text `>= 3` times in the window.
- New account age: `+8` if the account is `< 14 days` old.
Expand Down
20 changes: 19 additions & 1 deletion .github/workflows/code-simplifier.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ Use GitHub tools to:
For each merged PR or recent commit:
- Use `pull_request_read` with `method: get_files` to list changed files
- Use `get_commit` to see file changes in recent commits
- Focus on source code files (`.go`, `.js`, `.ts`, `.tsx`, `.cjs`, `.py`, etc.)
- Focus on source code files (`.go`, `.js`, `.ts`, `.tsx`, `.cjs`, `.py`, `.cs`, etc.)
- Exclude test files, lock files, and generated files

### 1.3 Determine Scope
Expand All @@ -95,6 +95,7 @@ Before simplifying, review the project's coding standards from relevant document
- For Go projects: Check `AGENTS.md`, `DEVGUIDE.md`, or similar files
- For JavaScript/TypeScript: Look for `CLAUDE.md`, style guides, or coding conventions
- For Python: Check for style guides, PEP 8 adherence, or project-specific conventions
- For .NET/C#: Check `.editorconfig`, `Directory.Build.props`, or coding conventions in docs

**Key Standards to Apply:**

Expand All @@ -119,6 +120,14 @@ For **Python** projects:
- Prefer explicit over implicit code
- Use list/dict comprehensions where they improve clarity (not complexity)

For **.NET/C#** projects:
- Follow Microsoft C# coding conventions
- Use `var` only when the type is obvious from the right side
- Use file-scoped namespaces (`namespace X;`) where supported
- Prefer pattern matching over type casting
- Use `async`/`await` consistently, avoid `.Result` or `.Wait()`
- Use nullable reference types and annotate nullability

### 2.2 Simplification Principles

Apply these refinements to the recently modified code:
Expand Down Expand Up @@ -203,6 +212,9 @@ npm test

# For Python projects
pytest

# For .NET projects
dotnet test
```

If tests fail:
Expand All @@ -224,6 +236,9 @@ npm run lint

# For Python projects
flake8 . || pylint .

# For .NET projects
dotnet format --verify-no-changes
```

Fix any linting issues introduced by the simplifications.
Expand All @@ -242,6 +257,9 @@ npm run build
# For Python projects
# (typically no build step, but check imports)
python -m py_compile changed_files.py

# For .NET projects
dotnet build
```

## Phase 4: Create Pull Request
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/copilot-pr-merged-report.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ safeinputs-gh with args: "pr view <PR_NUMBER> --repo ${{ github.repository }} --
From the files list, count how many are test files:
- Go test files: `*_test.go`
- JavaScript test files: `*.test.js`, `*.test.cjs`
- .NET test files: `*Tests.cs`, `*Test.cs`
- Count both added and modified test files

**Step 2.3: Get Workflow Run Information**
Expand Down Expand Up @@ -226,6 +227,7 @@ Create a concise report with the following structure:
- **Test File Types**:
- Go tests (`*_test.go`): [count]
- JavaScript tests (`*.test.js`): [count]
- .NET tests (`*Tests.cs`, `*Test.cs`): [count]

## Workflow Execution

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pr-triage-agent.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,9 @@ Determine category based on file patterns and PR description:

**File Pattern Rules:**
- **docs**: Changes only to `.md`, `.txt`, `.rst` files in `docs/`, `README.md`, `CHANGELOG.md`
- **test**: Changes only to `*_test.go`, `*_test.js`, `*.test.js` files
- **test**: Changes only to `*_test.go`, `*_test.js`, `*.test.js`, `*Tests.cs`, `*Test.cs` files
- **formatting**: Changes matching `.prettierrc`, `.editorconfig`, or whitespace-only diffs
- **chore**: Changes to `Makefile`, `.github/workflows/*.yml`, `go.mod`, `package.json`, CI configs
- **chore**: Changes to `Makefile`, `.github/workflows/*.yml`, `go.mod`, `package.json`, `*.csproj`, CI configs
- **refactor**: Code changes with no new features or bug fixes (look for keywords: "refactor", "restructure", "reorganize")
- **bug**: Keywords in title/description: "fix", "bug", "issue", "error", "crash"
- **feature**: Keywords in title/description: "add", "implement", "new", "feature", "support"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/repo-audit-analyzer.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ tree -L 3 -d -I 'node_modules|.git|vendor' . || find . -type d -maxdepth 3 ! -pa
ls -lh README* LICENSE* CONTRIBUTING* CODE_OF_CONDUCT* SECURITY* 2>/dev/null

# Build and test files
find . -maxdepth 2 -name "Makefile" -o -name "*.mk" -o -name "package.json" -o -name "go.mod" -o -name "requirements.txt" -o -name "Cargo.toml" -o -name "pom.xml" -o -name "build.gradle" -o -name ".fsproj" -o -name "*.sln"
find . -maxdepth 2 -name "Makefile" -o -name "*.mk" -o -name "package.json" -o -name "go.mod" -o -name "requirements.txt" -o -name "Cargo.toml" -o -name "pom.xml" -o -name "build.gradle" -o -name "*.csproj" -o -name "*.fsproj" -o -name "*.sln" -o -name "*.slnx"

# Documentation
find . -type d -name "docs" -o -name "documentation" -o -name "wiki"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/repository-quality-improver.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,14 +172,14 @@ SRC_LOC=$(find . -type f -name "*.go" ! -name "*_test.go" ! -path "./.git/*" | x
echo "Test ratio: $(echo "scale=2; $TEST_LOC / $SRC_LOC" | bc)"

# Test file count
find . -name "*_test.go" -o -name "*.test.js" | wc -l
find . -type f \( -name "*_test.go" -o -name "*.test.js" -o -name "*Tests.cs" -o -name "*Test.cs" \) | wc -l
```

### Security Analysis

```bash
# Check for common security issues
grep -r "password\|secret\|api_key" --include="*.go" --include="*.js" . 2>/dev/null | grep -v "test" | wc -l
grep -r "password\|secret\|api_key" --include="*.go" --include="*.js" --include="*.cs" . 2>/dev/null | grep -v "test" | wc -l

# Dependency vulnerability check (conceptual)
go list -m all | head -20
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/shared/metrics-patterns.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,8 @@ if [ -f /tmp/gh-aw/data/cloc_output.json ] && [ -s /tmp/gh-aw/data/cloc_output.j
lines_of_code_total=$(jq '.SUM.code' /tmp/gh-aw/data/cloc_output.json)

# Test LOC (find test files and measure)
# Scope: Files matching test patterns (*_test.go, *.test.js, *.test.cjs, test_*.py, *_test.py)
test_files=$(find . -name "*_test.go" -o -name "*.test.js" -o -name "*.test.cjs" -o -name "test_*.py" -o -name "*_test.py" 2>/dev/null)
# Scope: Files matching test patterns (*_test.go, *.test.js, *.test.cjs, test_*.py, *_test.py, *Tests.cs, *Test.cs)
test_files=$(find . -name "*_test.go" -o -name "*.test.js" -o -name "*.test.cjs" -o -name "test_*.py" -o -name "*_test.py" -o -name "*Tests.cs" -o -name "*Test.cs" 2>/dev/null)

if [ -n "$test_files" ]; then
echo "$test_files" | xargs cloc --json --quiet > /tmp/gh-aw/data/test_cloc.json
Expand Down
Loading