@@ -12,31 +12,44 @@ jobs:
1212 repair :
1313 if : github.event.pull_request.head.repo.full_name == github.repository && github.event.pull_request.head.ref == 'successor/telegram-tool-activity-clean'
1414 runs-on : ubuntu-22.04
15- timeout-minutes : 60
15+ timeout-minutes : 90
1616 steps :
1717 - uses : actions/checkout@v4
1818 with :
1919 ref : successor/telegram-tool-activity-clean
2020 fetch-depth : 0
2121 token : ${{ secrets.GITHUB_TOKEN }}
2222
23+ - name : Check one-shot trigger
24+ id : gate
25+ shell : bash
26+ run : |
27+ if [[ -f .github/trigger/verify-telegram-successor ]]; then
28+ echo "run=true" >> "$GITHUB_OUTPUT"
29+ else
30+ echo "run=false" >> "$GITHUB_OUTPUT"
31+ fi
32+
2333 - name : Rebuild reviewed net diff on current upstream dev
2434 id : apply
35+ if : steps.gate.outputs.run == 'true'
2536 continue-on-error : true
2637 shell : bash
2738 run : |
2839 git config user.name 'twoimo'
2940 git config user.email '32544727+twoimo@users.noreply.github.com'
3041 git remote add upstream https://github.com/Yeachan-Heo/gajae-code.git || true
3142 git fetch --no-tags upstream dev
32- git fetch --no-tags origin successor /telegram-tool-activity-clean
33- SOURCE=origin/successor /telegram-tool-activity-clean
43+ git fetch --no-tags origin backup /telegram-successor-76e205bc
44+ SOURCE=origin/backup /telegram-successor-76e205bc
3445 BASE=10a32cfdbe971799581533a0e583fdf77e4c7d2c
35- git diff --binary "$BASE".."$SOURCE" -- . ':(exclude).github/workflows/telegram-successor-sync.yml' > /tmp/telegram-successor.patch
46+ git diff --binary "$BASE".."$SOURCE" -- . \
47+ ':(exclude).github/workflows/telegram-successor-sync.yml' \
48+ > /tmp/telegram-successor.patch
3649 git reset --hard upstream/dev
3750 if ! git apply --3way --index /tmp/telegram-successor.patch; then
3851 git diff --name-only --diff-filter=U | sort > /tmp/telegram-conflicts.txt
39- if [ "$(cat /tmp/telegram-conflicts.txt)" = "packages/coding-agent/src/sdk/bus/index.ts" ]; then
52+ if [[ "$(cat /tmp/telegram-conflicts.txt)" == "packages/coding-agent/src/sdk/bus/index.ts" ] ]; then
4053 python3 - <<'PY'
4154 from pathlib import Path
4255 path = Path('packages/coding-agent/src/sdk/bus/index.ts')
7184 fi
7285
7386 - name : Report application conflicts
74- if : steps.apply.outcome == 'failure'
87+ if : steps.gate.outputs.run == 'true' && steps. apply.outcome == 'failure'
7588 uses : actions/github-script@v7
7689 with :
7790 script : |
@@ -90,16 +103,19 @@ jobs:
90103 });
91104
92105 - name : Stop after conflict report
93- if : steps.apply.outcome == 'failure'
106+ if : steps.gate.outputs.run == 'true' && steps. apply.outcome == 'failure'
94107 run : exit 1
95108
96109 - uses : oven-sh/setup-bun@v2
110+ if : steps.gate.outputs.run == 'true'
97111 with :
98112 bun-version : ' 1.3.14'
99113
100- - name : Install and format
114+ - name : Install, build native addon, and format
115+ if : steps.gate.outputs.run == 'true'
101116 run : |
102117 bun install --frozen-lockfile
118+ bun --cwd=packages/natives run build
103119 bunx biome check --write \
104120 packages/coding-agent/src/sdk/bus/telegram-daemon.ts \
105121 packages/coding-agent/src/sdk/bus/index.ts \
@@ -108,9 +124,11 @@ jobs:
108124 git add -A
109125
110126 - name : Run rejected-terminal regression
127+ if : steps.gate.outputs.run == 'true'
111128 run : bun test --timeout 30000 packages/coding-agent/test/notifications-telegram-daemon.test.ts --test-name-pattern 'terminal submission rejection'
112129
113130 - name : Run Telegram lifecycle boundary
131+ if : steps.gate.outputs.run == 'true'
114132 run : |
115133 bun test --timeout 30000 \
116134 packages/coding-agent/test/notifications-telegram-daemon.test.ts \
@@ -122,15 +140,17 @@ jobs:
122140 bun --cwd=packages/coding-agent run check
123141
124142 - name : Publish verified current-dev successor
143+ if : steps.gate.outputs.run == 'true'
125144 shell : bash
126145 run : |
127- rm -f .github/workflows/telegram-successor-sync.yml
146+ rm -f packages/natives/native/*.node
128147 git add -A
129148 git commit -m 'fix(notifications): make Telegram tool activity opt-in'
130149 git push --force origin HEAD:successor/telegram-tool-activity-clean
131150 git push --force origin HEAD:verified/telegram-tool-activity-terminal-rejection
132151
133152 - name : Report success
153+ if : steps.gate.outputs.run == 'true'
134154 uses : actions/github-script@v7
135155 with :
136156 script : |
0 commit comments