forked from nrwl/nx-examples
-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use base SHA instead of base branch since the base branch #2
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
50130f8
get base sha
jainankit f9911f3
use base sha in calculating diff
jainankit d3ef0f2
use partial clone to fetch references on the fly
jainankit db280b3
fetch-depth
jainankit 8f9234b
no partial
jainankit ac581d7
use partial clone, add comment
jainankit 2d95a82
Update cart-cart-page.tsx
jainankit 24941e2
Update cart-cart-page.tsx
jainankit File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,24 +4,38 @@ on: | |
pull_request: | ||
|
||
jobs: | ||
nextjs-build: | ||
fetch-aviator-targets: | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: . | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
# using partial clone to make sure we fetch what we need | ||
# when comparing base and head. | ||
filter: 'blob:none' | ||
fetch-depth: 0 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: '18' | ||
cache: 'yarn' | ||
- run: yarn install | ||
- uses: octokit/[email protected] | ||
id: get_pr | ||
with: | ||
route: GET /repos/${{ github.repository }}/pulls/${{ github.event.number }} | ||
owner: octokit | ||
repo: request-action | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
|
||
- run: | | ||
set -euo pipefail | ||
git fetch origin $GITHUB_BASE_REF | ||
PR_NUMBER=${{ github.event.number }} | ||
TARGETS_JSON=$(npx nx show projects --affected --base FETCH_HEAD --head HEAD --json) | ||
TARGETS_JSON=$(npx nx show projects --affected --base ${{ fromJson(steps.get_pr.outputs.data).base.sha }} --head ${{ github.sha }} --json) | ||
echo $TARGETS_JSON | ||
echo latest sha: '${{ fromJson(steps.get_pr.outputs.data).base.sha }}' | ||
curl -X POST -H "Authorization: Bearer ${{ secrets.AVIATOR_API_TOKEN }}" \ | ||
-H "Content-Type: application/json" \ | ||
-d '{ | ||
|
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cannot comment on the exact line, but on line 13, add