Skip to content

Commit f711010

Browse files
authored
chore: Update OpenAPI specs (#153)
1 parent 34edd21 commit f711010

File tree

14 files changed

+18025
-7724
lines changed

14 files changed

+18025
-7724
lines changed

.github/workflows/changelog.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ jobs:
1111
steps:
1212
- name: Get current date
1313
id: date
14-
run: echo "::set-output name=date::$(date +'%Y-%m-%d')"
14+
run: |
15+
echo "DATE=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
1516
- name: Check out repository content
1617
uses: actions/checkout@v2
1718
with:
@@ -35,33 +36,33 @@ jobs:
3536
base: 'base/fern/apis/public/openapi-public.yaml'
3637
revision: 'head/fern/apis/public/openapi-public.yaml'
3738
format: text
38-
output-to-file: 'temp/public/${{ steps.date.outputs.date }}_oasdiff.md'
39+
output-to-file: 'temp/public/${{ env.DATE }}_oasdiff.md'
3940
- name: Running beta OpenAPI Spec diff action
4041
uses: oasdiff/oasdiff-action/diff@main
4142
with:
4243
base: 'base/fern/apis/beta/openapi-beta.yaml'
4344
revision: 'head/fern/apis/beta/openapi-beta.yaml'
4445
format: text
45-
output-to-file: 'temp/beta/${{ steps.date.outputs.date }}_oasdiff.md'
46+
output-to-file: 'temp/beta/${{ env.DATE }}_oasdiff.md'
4647
- name: Archive changelogs
4748
uses: actions/upload-artifact@v4
4849
with:
49-
name: changelog-${{ steps.date.outputs.date }}
50+
name: changelog-${{ env.DATE }}
5051
path: temp/**
5152
- name: Prompt
5253
env:
5354
LLM_JWT: ${{ secrets.LLM_JWT }}
5455
run: |
55-
logfiles="fern/apis/*/changelog/${{ steps.date.outputs.date }}.md"
56+
logfiles="fern/apis/*/changelog/${{ env.DATE }}.md"
5657
5758
if ls $logfiles >/dev/null 2>&1; then
5859
logfiles=($logfiles)
5960
echo "${logfiles[@]} already exist."
6061
else
61-
python changelog.py --date ${{ steps.date.outputs.date }}
62+
python changelog.py --date ${{ env.DATE }}
6263
git config user.name github-actions
6364
git config user.email github-actions@github.com
64-
git add fern/apis/*/changelog/${{ steps.date.outputs.date }}.md
65+
git add fern/apis/*/changelog/${{ env.DATE }}.md
6566
git commit -m "generated by Claude"
6667
git push
6768
fi

changelog.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ def gen_log(prompt):
4444
r = requests.post('https://openwebui.dev.devrev-eng.ai/api/chat/completions', json=payload,
4545
headers=headers)
4646
log = r.json()['choices'][0]['message']['content']
47-
log = re.sub(r"^Here's.*\n?", '', log, flags=re.MULTILINE)
47+
log = re.sub(r"^# .*\n?", '', log, flags=re.MULTILINE)
48+
log = re.sub(r"^Here.*\n?", '', log, flags=re.MULTILINE)
4849
log = re.sub(r"^Let me know.*\n?", '', log, flags=re.MULTILINE)
4950
except Exception as e:
5051
print(

0 commit comments

Comments
 (0)