Skip to content

Commit 575f3ae

Browse files
chore: apply targeted CodeRabbit fixture fix
1 parent 6abb290 commit 575f3ae

1 file changed

Lines changed: 60 additions & 0 deletions

File tree

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: Temporary CodeRabbit 9212 fix
2+
3+
on:
4+
push:
5+
branches:
6+
- fix/unknown-provider-pr-polling
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
patch:
13+
if: github.actor != 'github-actions[bot]'
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
with:
18+
ref: fix/unknown-provider-pr-polling
19+
20+
- name: Patch GitManager test fixture
21+
shell: bash
22+
run: |
23+
python - <<'PY'
24+
from pathlib import Path
25+
26+
path = Path("apps/server/src/git/GitManager.test.ts")
27+
text = path.read_text()
28+
old = ''' GitHubSourceControlProvider.make.pipe(
29+
Effect.map((provider) => {
30+
const sourceControlProvider = () => ({
31+
...provider,
32+
kind:
33+
typeof input?.sourceControlProviderKind === "function"
34+
? input.sourceControlProviderKind()
35+
: (input?.sourceControlProviderKind ?? provider.kind),
36+
});'''
37+
new = ''' GitHubSourceControlProvider.make.pipe(
38+
Effect.map((provider) => {
39+
const baseProvider = input?.sourceControlProvider ?? provider;
40+
const sourceControlProvider = () => ({
41+
...baseProvider,
42+
kind:
43+
typeof input?.sourceControlProviderKind === "function"
44+
? input.sourceControlProviderKind()
45+
: (input?.sourceControlProviderKind ?? baseProvider.kind),
46+
});'''
47+
if old not in text:
48+
raise SystemExit("target makeManager provider block not found")
49+
path.write_text(text.replace(old, new, 1))
50+
PY
51+
52+
- name: Commit targeted fix
53+
shell: bash
54+
run: |
55+
git config user.name "github-actions[bot]"
56+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
57+
git add apps/server/src/git/GitManager.test.ts
58+
git rm .github/workflows/tmp-coderabbit-9212-fix.yml
59+
git commit -m "test(server): preserve injected source-control provider"
60+
git push origin HEAD:fix/unknown-provider-pr-polling

0 commit comments

Comments
 (0)