Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/go_modules/generators/go/github.c…
Browse files Browse the repository at this point in the history
…om/stretchr/testify-1.10.0
  • Loading branch information
dannysheridan authored Dec 1, 2024
2 parents e6961a5 + ad8197e commit 4562c03
Show file tree
Hide file tree
Showing 2,128 changed files with 48,099 additions and 141,752 deletions.
31 changes: 25 additions & 6 deletions .github/workflows/preview-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ on:
pull_request_target:
branches:
- main
paths:
- 'fern/**'
- 'packages/cli/docs-**'
workflow_dispatch:
inputs:
prNumber:
Expand Down Expand Up @@ -38,10 +41,26 @@ jobs:
echo "$OUTPUT"
URL=$(echo "$OUTPUT" | grep -oP 'Published docs to \K.*(?= \()')
echo "Preview URL: $URL"
echo "🌿 Preview your docs: $URL" > preview_url.txt
echo "$URL" > preview_url.txt
- name: Comment URL in PR
uses: thollander/[email protected]
with:
filePath: preview_url.txt
comment_tag: docs-preview-link
- name: Comment or Update URL in PR
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
COMMENT_TAG="<!-- docs-preview-link -->"
PREVIEW_URL=$(cat preview_url.txt)
# Get existing comments
EXISTING_COMMENT=$(gh api repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/comments \
--jq ".[] | select(.body | contains(\"${COMMENT_TAG}\")) | .id")
if [ -z "$EXISTING_COMMENT" ]; then
# No existing comment, create one
gh api repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/comments \
-f body="${COMMENT_TAG}🌿 Preview your docs: $PREVIEW_URL"
else
# Update existing comment
gh api repos/${{ github.repository }}/issues/comments/$EXISTING_COMMENT \
-X PATCH \
-f body="${COMMENT_TAG}🌿 Preview your docs: $PREVIEW_URL"
fi
50 changes: 50 additions & 0 deletions fern.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -497,6 +497,16 @@
}
]
},
"inline": {
"oneOf": [
{
"type": "boolean"
},
{
"type": "null"
}
]
},
"docs": {
"oneOf": [
{
Expand Down Expand Up @@ -700,6 +710,16 @@
}
]
},
"inline": {
"oneOf": [
{
"type": "boolean"
},
{
"type": "null"
}
]
},
"docs": {
"oneOf": [
{
Expand Down Expand Up @@ -1033,6 +1053,16 @@
}
]
},
"inline": {
"oneOf": [
{
"type": "boolean"
},
{
"type": "null"
}
]
},
"docs": {
"oneOf": [
{
Expand Down Expand Up @@ -1189,6 +1219,16 @@
}
]
},
"inline": {
"oneOf": [
{
"type": "boolean"
},
{
"type": "null"
}
]
},
"docs": {
"oneOf": [
{
Expand Down Expand Up @@ -1274,6 +1314,16 @@
}
]
},
"inline": {
"oneOf": [
{
"type": "boolean"
},
{
"type": "null"
}
]
},
"docs": {
"oneOf": [
{
Expand Down
52 changes: 26 additions & 26 deletions fern/apis/fern-definition/definition/commons.yml
Original file line number Diff line number Diff line change
@@ -1,39 +1,39 @@
imports:
imports:
availability: availability.yml

types:
WithDocsSchema:
properties:
types:
WithDocsSchema:
properties:
docs: optional<string>
WithName:
properties:

WithName:
properties:
name: optional<string>
WithAvailability:
properties:

WithAvailability:
properties:
availability: optional<availability.AvailabilityUnionSchema>
WithDisplayName:
properties:

WithDisplayName:
properties:
display-name: optional<string>
WithAudiences:
properties:

WithAudiences:
properties:
audiences: optional<list<string>>
DeclarationSchema:
extends:

DeclarationSchema:
extends:
- WithDocsSchema
- WithAvailability
- WithAudiences
DeclarationWithoutDocsSchema:
extends:

DeclarationWithoutDocsSchema:
extends:
- WithAvailability
- WithAudiences
DeclarationWithNameSchema:
extends:

DeclarationWithNameSchema:
extends:
- DeclarationSchema
- WithName
- WithName
Loading

0 comments on commit 4562c03

Please sign in to comment.