-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8750f1c
commit e63d595
Showing
3 changed files
with
86 additions
and
0 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,39 @@ | ||
name: Autoupdate PR | ||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
update_pull_requests: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
token: ${{ secrets.DISPATCH_ACCESS_TOKEN }} | ||
|
||
- name: Set up Git | ||
run: | | ||
git config --global user.name 'box-sdk-build' | ||
git config --global user.email 'box-sdk-build@box.com' | ||
- name: Fetch all branches and tags | ||
run: git fetch --prune --unshallow | ||
|
||
- name: Auto update pull requests | ||
run: | | ||
PR_LIST=$(curl -s -H "Authorization: Bearer ${{ secrets.DISPATCH_ACCESS_TOKEN }}" "https://api.github.com/repos/$GITHUB_REPOSITORY/pulls?state=open" | jq -r '.[] | .head.ref') | ||
for pr_branch in $PR_LIST; do | ||
git checkout "$pr_branch" | ||
if git merge origin/main; then | ||
git push | ||
else | ||
# Conflict occurred, resolve by keeping our changes | ||
git checkout --ours . | ||
git add . | ||
git commit -m "Auto resolve conflict by keeping our changes" | ||
git push | ||
fi | ||
done |
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,26 @@ | ||
name: build | ||
on: | ||
pull_request: | ||
types: [ opened, synchronize ] | ||
push: | ||
branches: | ||
- main | ||
jobs: | ||
build-and-test: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
distribution: [ 'zulu', 'temurin' ] | ||
java: [ '8', '11', '17' ] | ||
name: Java ${{ matrix.java }} (${{ matrix.distribution }}) | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Setup Java | ||
uses: actions/setup-java@v2 | ||
with: | ||
distribution: ${{ matrix.distribution }} | ||
java-version: ${{ matrix.java }} | ||
cache: 'gradle' | ||
- name: Build and test | ||
run: ./gradlew check --stacktrace |
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,21 @@ | ||
name: spell-check-lint | ||
on: | ||
pull_request_target: | ||
types: [opened, synchronize, edited] | ||
branches: | ||
- main | ||
jobs: | ||
spellcheck-request-title: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout current repository | ||
uses: actions/checkout@v2 | ||
- name: Checkout spellchecker | ||
uses: actions/checkout@v2 | ||
with: | ||
ref: refs/heads/main | ||
repository: box/box-sdk-spellchecker | ||
token: ${{ secrets.DISPATCH_ACCESS_TOKEN }} | ||
path: spellchecker | ||
- name: Execute spellchecker | ||
uses: ./spellchecker |