-
Notifications
You must be signed in to change notification settings - Fork 283
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'solana-foundation:main' into main
- Loading branch information
Showing
291 changed files
with
29,163 additions
and
18,496 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,63 +1,16 @@ | ||
name: "Label Actions" | ||
|
||
# env: | ||
# GH_PERSONAL_ACCESS_TOKEN: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }} | ||
|
||
on: | ||
pull_request_target: | ||
issues: | ||
types: [labeled, unlabeled] | ||
pull_request: | ||
types: [labeled, unlabeled] | ||
# issues: | ||
# types: [labeled, unlabeled] | ||
# discussion: | ||
# types: [labeled, unlabeled] | ||
|
||
permissions: | ||
contents: read | ||
issues: write | ||
pull-requests: write | ||
discussions: write | ||
|
||
jobs: | ||
# run the local prettier config on the PR | ||
prettier: | ||
if: contains(github.event.pull_request.labels.*.name, 'prettier') | ||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
# Give the default GITHUB_TOKEN write permission to commit and push the | ||
# added or changed files to the repository. | ||
contents: write | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.event.pull_request.head.sha }} | ||
- name: Use Node.js node | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: "18" | ||
|
||
- name: before_install | ||
run: | ||
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf | ||
&& sudo sysctl -p | ||
|
||
# perform steps to modify as desired | ||
- name: yarn install | ||
run: yarn install | ||
- name: yarn prettier:fix | ||
run: yarn prettier:fix | ||
|
||
- name: Commit changes | ||
uses: stefanzweifel/git-auto-commit-action@v5 | ||
with: | ||
commit_message: "chore: prettier" | ||
|
||
action: | ||
label-actions: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: dessant/label-actions@v4 | ||
- uses: dessant/label-actions@v3 | ||
with: | ||
# github-token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }} | ||
config-path: ".github/label-actions.yml" | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
config-path: .github/label-actions.yml |
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,70 @@ | ||
name: Prettier Formatting on Label | ||
|
||
# Explicitly set permissions | ||
permissions: | ||
contents: write | ||
pull-requests: write | ||
|
||
on: | ||
pull_request: | ||
types: [labeled] | ||
|
||
jobs: | ||
prettier-format: | ||
# Only run if the 'prettier' label is added | ||
if: ${{ contains(github.event.pull_request.labels.*.name, 'prettier') }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
# Checkout the PR branch | ||
- uses: actions/checkout@v4 | ||
with: | ||
# Use the full PR head reference | ||
ref: ${{ github.event.pull_request.head.ref }} | ||
# Use the full repository name | ||
repository: ${{ github.event.pull_request.head.repo.full_name }} | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
fetch-depth: 0 | ||
|
||
# Setup Node.js (required for Prettier) | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: "lts/*" | ||
|
||
# Install Prettier | ||
- name: Install Prettier | ||
run: npm install --save-dev --save-exact prettier | ||
|
||
# Run Prettier using the repo's config | ||
- name: Run Prettier | ||
run: npx prettier --write . | ||
|
||
# Check if there are any changes | ||
- name: Check for changes | ||
id: check-changes | ||
run: | | ||
git diff --quiet || echo "changes=true" >> $GITHUB_OUTPUT | ||
# Commit and push changes if any | ||
- name: Commit changes | ||
if: steps.check-changes.outputs.changes == 'true' | ||
run: | | ||
git config --local user.email "[email protected]" | ||
git config --local user.name "GitHub Action" | ||
git add . | ||
git commit -m "[chore] automatic prettier formatting" | ||
git push origin HEAD:${{ github.event.pull_request.head.ref }} | ||
# Remove the label after formatting | ||
# todo: label removal is flaky, disabled for now | ||
# - name: Remove formatting label | ||
# if: always() | ||
# uses: actions/github-script@v7 | ||
# with: | ||
# github-token: ${{ secrets.GITHUB_TOKEN }} | ||
# script: | | ||
# github.rest.issues.removeLabel({ | ||
# owner: context.repo.owner, | ||
# repo: context.repo.repo, | ||
# issue_number: context.issue.number, | ||
# name: 'prettier' | ||
# }) |
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,37 @@ | ||
name: Mark Stale Issues and PRs | ||
|
||
on: | ||
schedule: | ||
# Run daily at midnight | ||
- cron: "0 0 * * *" | ||
|
||
jobs: | ||
stale: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/stale@v9 | ||
with: | ||
# Issues configuration | ||
stale-issue-message: | ||
"This issue has been automatically marked as stale because it has | ||
not had recent activity. Remove stale label or comment or this will | ||
be closed in 5 days." | ||
stale-issue-label: "no-issue-activity" | ||
days-before-issue-stale: 30 # Mark as stale after 30 days of inactivity | ||
days-before-issue-close: 5 # Close 5 days after being marked stale | ||
|
||
# Pull Request configuration | ||
stale-pr-message: | ||
"This pull request has been automatically marked as stale because it | ||
has not had recent activity. Remove stale label or comment or this | ||
will be closed in 7 days." | ||
stale-pr-label: "no-pr-activity" | ||
days-before-pr-stale: 21 # Mark PRs as stale after 21 days | ||
days-before-pr-close: 7 # Close PRs 7 days after being marked stale | ||
|
||
# Exempt labels and other configurations | ||
exempt-issue-labels: "bug,enhancement,in-progress,not-stale" | ||
exempt-pr-labels: "work-in-progress,review-needed,not-stale" | ||
|
||
# Optional: Dry run to test configuration | ||
dry-run: true |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
_ |
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 @@ | ||
npx lint-staged |
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 +1,2 @@ | ||
.github/*.md | ||
.github/*.md | ||
CODEOWNERS |
Validating CODEOWNERS rules …
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,11 +1,12 @@ | ||
# This is a comment. | ||
# Each line is a file pattern followed by one or more owners. | ||
|
||
# These global owners will be the default owners for everything in | ||
# the repo. Unless a later match takes precedence, will be requested for | ||
# review when someone opens a pull request. | ||
* @nickfrosty | ||
* @ZYJLiu | ||
|
||
# This list owns any file in the `/docs` directory in the root of | ||
# the repository and any of its subdirectories. | ||
# /docs/ @nickfrosty | ||
|
||
/docs/ @ZYJLiu |
Oops, something went wrong.