-
Notifications
You must be signed in to change notification settings - Fork 489
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/master'
- Loading branch information
Showing
219 changed files
with
5,495 additions
and
3,435 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 |
---|---|---|
@@ -0,0 +1,107 @@ | ||
name: File Size Checker | ||
|
||
# Add required permissions | ||
permissions: | ||
contents: read | ||
pull-requests: write | ||
statuses: write | ||
|
||
on: | ||
pull_request: | ||
types: [opened, synchronize] | ||
|
||
jobs: | ||
check-file-sizes: | ||
name: File Size Check | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Check file sizes | ||
id: check-sizes | ||
run: | | ||
# Initialize variables for tracking findings | ||
large_files="" | ||
huge_files="" | ||
# Get all files in the PR | ||
echo "Files changed in PR:" | ||
git diff --name-only ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }} | ||
for file in $(git diff --name-only ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }}); do | ||
if [ -f "$file" ]; then | ||
size=$(stat -c%s "$file") | ||
size_mb=$(echo "scale=2; $size/1048576" | bc) | ||
echo "Checking $file: ${size_mb}MB" | ||
# Check for files over 40MB | ||
if (( $(echo "$size_mb > 40" | bc -l) )); then | ||
huge_files="${huge_files}* ${file} (${size_mb}MB)\n" | ||
# Check for files over 10MB | ||
elif (( $(echo "$size_mb > 10" | bc -l) )); then | ||
large_files="${large_files}* ${file} (${size_mb}MB)\n" | ||
fi | ||
fi | ||
done | ||
# Print findings for debugging | ||
echo "Large files found:" | ||
echo -e "$large_files" | ||
echo "Huge files found:" | ||
echo -e "$huge_files" | ||
# Set outputs for use in next steps | ||
echo "large_files<<EOF" >> $GITHUB_OUTPUT | ||
echo -e "$large_files" >> $GITHUB_OUTPUT | ||
echo "EOF" >> $GITHUB_OUTPUT | ||
echo "huge_files<<EOF" >> $GITHUB_OUTPUT | ||
echo -e "$huge_files" >> $GITHUB_OUTPUT | ||
echo "EOF" >> $GITHUB_OUTPUT | ||
# Fail if huge files are found | ||
if [ ! -z "$huge_files" ]; then | ||
echo "❌ Files over 40MB found!" | ||
exit 1 | ||
fi | ||
- name: Update Status and Comment | ||
if: always() | ||
uses: actions/github-script@v7 | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
script: | | ||
const hugeFiles = `${{ steps.check-sizes.outputs.huge_files }}`; | ||
const largeFiles = `${{ steps.check-sizes.outputs.large_files }}`; | ||
try { | ||
// Only comment if issues were found | ||
if (hugeFiles || largeFiles) { | ||
let comment = '## ⚠️ File Size Check Results\n\n'; | ||
if (hugeFiles) { | ||
comment += '### 🚫 Files over 40MB (Not Allowed):\n' + hugeFiles + '\n'; | ||
comment += '**These files must be removed from git history before the PR can be merged.**\n\n'; | ||
} | ||
if (largeFiles) { | ||
comment += '### ⚠️ Large Files (Over 10MB):\n' + largeFiles + '\n'; | ||
comment += 'Consider reducing the size of these files if possible.\n'; | ||
} | ||
await github.rest.issues.createComment({ | ||
issue_number: context.payload.pull_request.number, | ||
owner: context.payload.repository.owner.login, | ||
repo: context.payload.repository.name, | ||
body: comment | ||
}); | ||
} | ||
} catch (error) { | ||
console.error('Error:', error); | ||
core.setFailed(error.message); | ||
} |
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
Binary file added
BIN
+234 KB
apps/base-docs/assets/images/onchainkit-tutorials/swapped-theme-before.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+217 KB
apps/base-docs/assets/images/onchainkit-tutorials/swapped-theme-final.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+154 KB
apps/base-docs/assets/images/paymaster-tutorials/basescan-token-transfer.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+131 KB
apps/base-docs/assets/images/paymaster-tutorials/cdp-copy-endpoint.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+371 KB
apps/base-docs/assets/images/paymaster-tutorials/cdp-paymaster-config.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+417 KB
apps/base-docs/assets/images/paymaster-tutorials/cdp-policy-settings.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+45 KB
apps/base-docs/assets/images/paymaster-tutorials/connect-wallet-mint-page.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+140 KB
apps/base-docs/assets/images/paymaster-tutorials/sponsored_mint_nft.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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
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
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
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
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
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
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.