Skip to content

Commit 5b7173e

Browse files
committed
Repo cleanup: restructure layout, update workflows, drop managed package
- Move source/ → src/core/, plugins/ → src/plugins/nebula-logger/ - Remove managed package support and packages/ directory - Fix CI recursion via bot-actor guard and workflow_call restructure - Add generate-docs and claude-review as post-test dependent jobs - Refactor packaging.yml into two independent jobs (unlocked + nebula plugin) - Refactor release.yml with detect-changes, per-package versioning, and monorepo-style tags (unlocked/vX.Y.Z, plugin-nebula/vX.Y.Z)
1 parent b407596 commit 5b7173e

File tree

66 files changed

+371
-286
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+371
-286
lines changed

.github/workflows/auto-documentation.yml

Lines changed: 23 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,8 @@
11
name: Auto Documentation
22

33
on:
4-
pull_request:
5-
branches: [main]
6-
types: [opened, ready_for_review, reopened, synchronize]
7-
paths:
8-
- "source/**"
9-
- "plugins/**"
10-
11-
concurrency:
12-
group: auto-doc
13-
cancel-in-progress: true
4+
workflow_dispatch:
5+
workflow_call:
146

157
permissions:
168
contents: write
@@ -20,7 +12,6 @@ permissions:
2012
jobs:
2113
auto-documentation:
2214
name: Generate Documentation
23-
if: ${{ !github.event.pull_request.draft }}
2415
runs-on: ubuntu-latest
2516
timeout-minutes: 15
2617

@@ -29,7 +20,7 @@ jobs:
2920
uses: actions/checkout@v4
3021
with:
3122
token: ${{ secrets.GITHUB_TOKEN }}
32-
ref: ${{ github.head_ref }}
23+
ref: ${{ github.head_ref || github.ref_name }}
3324
fetch-depth: 0
3425

3526
- name: Check if last commit was auto-documentation
@@ -99,6 +90,25 @@ jobs:
9990
## Expected Output:
10091
Create or modify files in the `wiki/` directory as needed. I will review these changes as part of the PR.
10192
93+
- name: Remove Claude Attribution
94+
if: steps.check-auto-commit.outputs.auto-commit == 'false' && steps.changed-files.outputs.has-apex-changes == 'true'
95+
run: |
96+
BRANCH="${{ github.head_ref || github.ref_name }}"
97+
BASE=$(git rev-parse "origin/${BRANCH}" 2>/dev/null || echo "")
98+
if [ -z "$BASE" ]; then
99+
echo "Cannot determine base commit; skipping attribution cleanup"
100+
exit 0
101+
fi
102+
if git log --format="%B" "${BASE}..HEAD" 2>/dev/null | grep -qi "co-authored-by.*claude"; then
103+
echo "Stripping Claude Co-authored-by trailers from new commits..."
104+
FILTER_BRANCH_SQUELCH_WARNING=1 git filter-branch -f --msg-filter \
105+
'sed "/[Cc]o-[Aa]uthored-[Bb]y.*[Cc]laude/d"' \
106+
"${BASE}..HEAD"
107+
git push origin "HEAD:${BRANCH}" --force
108+
else
109+
echo "No Claude attribution found in new commits"
110+
fi
111+
102112
- name: Check if Home.md Changed
103113
if: steps.check-auto-commit.outputs.auto-commit == 'false'
104114
id: check-home
@@ -147,4 +157,4 @@ jobs:
147157
148158
Generated documentation for new global classes/methods/properties"
149159
150-
git push origin ${{ github.head_ref }}
160+
git push origin ${{ github.head_ref || github.ref_name }}

.github/workflows/ci.yml

Lines changed: 46 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ on:
66
- main
77
types: [opened, ready_for_review, reopened, synchronize]
88
paths:
9-
- "source/**"
10-
- "plugins/**"
9+
- "src/**"
1110
- ".github/**"
1211

1312
concurrency:
@@ -32,40 +31,9 @@ permissions:
3231
pull-requests: write
3332

3433
jobs:
35-
claude-review:
36-
name: Claude Code Review
37-
if: ${{ '! github.event.pull_request.draft' }}
38-
runs-on: ubuntu-latest
39-
permissions:
40-
contents: read
41-
pull-requests: write
42-
issues: write
43-
id-token: write
44-
45-
steps:
46-
- name: Checkout
47-
uses: actions/checkout@v4
48-
with:
49-
fetch-depth: 1
50-
51-
- name: Run Claude Code Review
52-
id: claude-review
53-
uses: anthropics/claude-code-action@beta
54-
with:
55-
allowed_bots: "claude"
56-
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
57-
github_token: ${{ secrets.GITHUB_TOKEN }}
58-
direct_prompt: |
59-
Please review this pull request and provide feedback on:
60-
- Code quality and best practices
61-
- Potential bugs or issues
62-
- Performance considerations
63-
- Security concerns
64-
- Test coverage
65-
6634
scan:
6735
name: Run Static Analysis
68-
if: ${{ '! github.event.pull_request.draft' }}
36+
if: ${{ !github.event.pull_request.draft && !contains(github.actor, '[bot]') }}
6937
runs-on: ubuntu-latest
7038
timeout-minutes: 10
7139
steps:
@@ -84,7 +52,7 @@ jobs:
8452
# Ensure this check only runs against changed files in the current PR; not the entire codebase
8553
set -euo pipefail
8654
mkdir "$CHANGES_DIR"
87-
sf sgd source delta --generate-delta --from "HEAD^" --to "HEAD" --output-dir "$CHANGES_DIR"/ --source-dir "source/"
55+
sf sgd source delta --generate-delta --from "HEAD^" --to "HEAD" --output-dir "$CHANGES_DIR"/ --source-dir "src/"
8856
echo "Changed files:"
8957
ls "$CHANGES_DIR"
9058
@@ -127,16 +95,14 @@ jobs:
12795
12896
run-unit-tests:
12997
name: Run Unit Tests
130-
if: ${{ '! github.event.pull_request.draft' }}
98+
if: ${{ !github.event.pull_request.draft && !contains(github.actor, '[bot]') }}
13199
runs-on: ubuntu-latest
132100
timeout-minutes: 30
133101
steps:
134102
- name: Checkout
135103
uses: actions/checkout@v4
136-
137104
- name: Setup SF CLI
138105
uses: ./.github/actions/setup-sf-cli
139-
140106
- name: Authenticate Devhub
141107
env:
142108
CLIENT_ID: ${{ secrets.SALESFORCE_CONSUMER_KEY }}
@@ -150,7 +116,6 @@ jobs:
150116
--jwt-key-file server.key \
151117
--set-default-dev-hub \
152118
--username "$USERNAME"
153-
154119
- name: Get Existing Scratch Org
155120
id: get-existing
156121
continue-on-error: true
@@ -177,7 +142,6 @@ jobs:
177142
--username "$USERNAME"
178143
echo "success=true" >> "$GITHUB_OUTPUT"
179144
fi
180-
181145
- name: Create Scratch Org
182146
if: ${{ steps.get-existing.outputs.success != 'true' }}
183147
run: |
@@ -192,18 +156,16 @@ jobs:
192156
--set-default \
193157
--username "$USERNAME" \
194158
--wait 10
195-
196159
- name: Run Tests
197160
run: |
198161
sf project deploy start \
199162
--coverage-formatters json-summary \
200163
--dry-run \
201164
--ignore-conflicts \
202-
--source-dir source \
165+
--source-dir src \
203166
--test-level RunLocalTests \
204167
--verbose \
205168
--wait 30
206-
207169
- name: Check Code Coverage
208170
run: |
209171
# Parse the JSON coverage summary file to extract overall coverage percentage
@@ -213,7 +175,47 @@ jobs:
213175
echo "❌ Code coverage is ${COVERAGE_PERCENT}%, but >= 99% is required"
214176
exit 1
215177
fi
216-
217178
- name: Post Authenticate Devhub
218179
if: ${{ always() }}
219180
run: rm -f server.key
181+
182+
claude-review:
183+
name: Claude Code Review
184+
needs: [scan, run-unit-tests]
185+
if: ${{ !github.event.pull_request.draft && !contains(github.actor, '[bot]') }}
186+
runs-on: ubuntu-latest
187+
permissions:
188+
contents: read
189+
pull-requests: write
190+
issues: write
191+
id-token: write
192+
steps:
193+
- name: Checkout
194+
uses: actions/checkout@v4
195+
with:
196+
fetch-depth: 1
197+
- name: Run Claude Code Review
198+
id: claude-review
199+
uses: anthropics/claude-code-action@beta
200+
with:
201+
allowed_bots: "claude"
202+
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
203+
github_token: ${{ secrets.GITHUB_TOKEN }}
204+
direct_prompt: |
205+
Please review this pull request and provide feedback on:
206+
- Code quality and best practices
207+
- Potential bugs or issues
208+
- Performance considerations
209+
- Security concerns
210+
- Test coverage
211+
212+
generate-docs:
213+
name: Generate Documentation
214+
needs: [scan, run-unit-tests]
215+
if: ${{ !github.event.pull_request.draft && !contains(github.actor, '[bot]') }}
216+
uses: ./.github/workflows/auto-documentation.yml
217+
permissions:
218+
contents: write
219+
pull-requests: write
220+
id-token: write
221+
secrets: inherit

0 commit comments

Comments
 (0)