Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into v0.11.0
Browse files Browse the repository at this point in the history
  • Loading branch information
phryneas committed Apr 25, 2024
2 parents 3e169ac + 882b4ed commit 3863113
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ jobs:

- name: Create Docs
run: |
yarn workspaces foreach --all --include "@apollo/*" run build
yarn workspaces foreach --all --include "@apollo/*" exec api-extractor run
yarn run build:libs
yarn run build:docmodel
yarn workspace monorepo docs
- name: Commit changes back
Expand Down
38 changes: 35 additions & 3 deletions .github/workflows/snapshot-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
if: |
github.repository == 'apollographql/apollo-client-nextjs' &&
(
github.event_name == 'workflow_dispatch' ||
github.event_name == 'workflow_dispatch' ||
(
github.event.issue.pull_request &&
(
Expand All @@ -29,18 +29,50 @@ jobs:
)
)
steps:
- uses: alessbell/pull-request-comment-branch@v1.1
- uses: alessbell/pull-request-comment-branch@v2.1.0
if: github.event_name == 'issue_comment'
id: comment-branch

- name: Get sha
if: github.event_name == 'issue_comment'
id: parse-sha
continue-on-error: true
run: |
if [ "${{ steps.comment-branch.outputs.head_owner }}" == "apollographql" ]; then
echo "sha=${{ steps.comment-branch.outputs.head_sha }}" >> "${GITHUB_OUTPUT}"
else
sha_from_comment="$(echo $COMMENT_BODY | tr -s ' ' | cut -d ' ' -f2)"
if [ $sha_from_comment == "/release:pr" ]; then
exit 1
else
echo "sha=$sha_from_comment" >> "${GITHUB_OUTPUT}"
fi
fi
env:
COMMENT_BODY: ${{ github.event.comment.body }}

- name: Comment sha reminder
if: steps.parse-sha.outcome == 'failure'
uses: peter-evans/[email protected]
with:
issue-number: ${{ github.event.issue.number }}
body: |
Did you forget to add the sha? Please use `/release:pr <sha>`
- name: Fail job
if: steps.parse-sha.outcome == 'failure'
run: |
exit 1
- name: Checkout head ref (comment trigger)
if: github.event_name == 'issue_comment'
uses: actions/checkout@v4
with:
## specify the owner + repository in order to checkout the fork
## for community PRs
repository: ${{ steps.comment-branch.outputs.head_owner }}/${{ steps.comment-branch.outputs.head_repo }}
ref: ${{ steps.comment-branch.outputs.head_ref }}
ref: ${{ steps.parse-sha.outputs.sha }}
fetch-depth: 0

- name: Checkout head ref (dispatch trigger)
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
"verify-package-shape": "node ./scripts/verify-package-shape.mjs",
"matrix": "node ./scripts/test-matrix.js",
"docs": "api-documenter markdown --input-folder temp --output-folder docs",
"build:libs": "yarn workspaces foreach --all --include \"@apollo/*\" run build"
"build:libs": "yarn workspaces foreach --all --include \"@apollo/*\" run build",
"build:docmodel": "yarn workspaces foreach --all --include \"@apollo/*\" exec api-extractor run"
},
"resolutions": {
"[email protected]": "18.3.0-canary-60a927d04-20240113",
Expand Down

0 comments on commit 3863113

Please sign in to comment.