-
Notifications
You must be signed in to change notification settings - Fork 159
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into dependabot/go_modules/generators/go/github.c…
…om/stretchr/testify-1.10.0
- Loading branch information
Showing
2,128 changed files
with
48,099 additions
and
141,752 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,9 @@ on: | |
pull_request_target: | ||
branches: | ||
- main | ||
paths: | ||
- 'fern/**' | ||
- 'packages/cli/docs-**' | ||
workflow_dispatch: | ||
inputs: | ||
prNumber: | ||
|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Oops, something went wrong.