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
7 changes: 6 additions & 1 deletion .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,13 @@ jobs:
steps:
- name: Get current date
id: date
env:
GH_TOKEN: ${{ github.token }}
PR_NUMBER: ${{ github.event.number }}
run: |
echo "DATE=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
DATE=$(gh pr view --repo https://github.com/devrev/fern-api-docs ${{ env.PR_NUMBER }} --json createdAt --jq .[] | cut -d 'T' -f 1)
echo "DATE=$DATE" >> $GITHUB_ENV
echo "Date PR opened is ${{ env.DATE }}"
- name: Check out repository content
uses: actions/checkout@v2
with:
Expand Down
8 changes: 4 additions & 4 deletions changelog.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ def main(vrn, d):
outfile.write(p)
print(f"Wrote prompt to {pr_file}.")

print('Sending request to LLM.')
l = llm_client.get_response(p)

log_file = f"./fern/apis/{vrn}/changelog/{d}.md"
if (l):
with open(log_file, 'w', encoding="utf-8") as outfile:
outfile.write(l)
outfile.write(llm_client.get_lines_between_tags(l, 'changelog'))
print(f"Wrote log to {log_file}.")
else:
print(f"Failed to generate {log_file}.")
print(f"Failed to generate {log_file}. No response from LLM.")



Expand All @@ -32,7 +32,7 @@ def gen_prompt(oasdiff, links, version):
oasdiff = infile.read()

prompt = f"""
Please provide an API changelog for the {version} API from the following OASDiff of OpenAPI spec changes. The output should be in markdown format grouping endpoints by use case/object type. For cases where some schema is modified, please also tell what endpoints it affects. Wherever an endpoint, property, or enum value is mentioned, surround it with backticks (`). Wherever an API is mentioned, include a hyperlink to the corresponding path from `<api_links>` section.
Please provide an API changelog for the {version} API from the following OASDiff of OpenAPI spec changes. The output should be in markdown format grouping endpoints by use case/object type. For cases where some schema is modified, please also tell what endpoints it affects. Wherever an endpoint, property, or enum value is mentioned, surround it with backticks (`). Use only H2 and H3 headings. Wherever an API is mentioned, include a hyperlink to the corresponding path from `<api_links>` section. Place the changelog in a `<changelog>` element in your response so I can parse it out.

<oasdiff>
{oasdiff}
Expand Down
19 changes: 19 additions & 0 deletions fern/apis/beta/changelog/2025-04-24.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@

## New Endpoints

### Service Accounts
- Added [`POST /service-accounts.create`](/beta/api-reference/service-accounts/create) for creating service accounts

### Widgets
- Added [`GET /widgets.get`](/beta/api-reference/widgets/get) for retrieving widgets

## Modified Features

### Customization
- Added `is_overridable` property to schema enum fields

### Timeline
- Added `references` property to timeline comments

### Parts
- Added support for part types `linkable` and `runnable`
Loading
Loading