-
Notifications
You must be signed in to change notification settings - Fork 189
chore: Adjust build process #1444
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
Merged
Merged
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
95516d9
wip
lukaszsocha2 dd19b9a
fix
lukaszsocha2 8e8edfa
fix12
lukaszsocha2 0ad592e
add docs
lukaszsocha2 de6c0bc
Merge branch 'combined-sdk' into fix-build
lukaszsocha2 d0fb850
change order
lukaszsocha2 8039726
add coverallsJacoco
lukaszsocha2 5209fb7
add coverallsJacoco
lukaszsocha2 84cf0f6
add coverallsJacoco
lukaszsocha2 c047bef
fixes
lukaszsocha2 a3bc394
fixes
lukaszsocha2 6e834da
fix
lukaszsocha2 2dc89de
reorder
lukaszsocha2 e7a7458
check
lukaszsocha2 b75a4e9
check2
lukaszsocha2 53aafa1
check3
lukaszsocha2 362b32f
fix
lukaszsocha2 fa8db00
fix1
lukaszsocha2 3dd9b4c
working
lukaszsocha2 c0ebe14
fixes
lukaszsocha2 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 hidden or 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: | ||
| - combined-sdk | ||
|
|
||
| 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/combined-sdk; 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 hidden or 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,34 @@ | ||
| name: Integration tests sdk | ||
| on: | ||
| pull_request: | ||
| branches: | ||
| - combined-sdk | ||
| jobs: | ||
| core: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
| - name: Setup Java | ||
| uses: actions/setup-java@v4 | ||
| with: | ||
| distribution: 'temurin' | ||
| java-version: '8' | ||
| - name: All Tests | ||
| if: startsWith(github.head_ref, 'codegen-release') | ||
| env: | ||
| JAVA_COLLABORATOR_ID: ${{ secrets.JAVA_COLLABORATOR_ID }} | ||
| JAVA_COLLABORATOR: ${{ secrets.JAVA_COLLABORATOR }} | ||
| JAVA_ENTERPRISE_ID: ${{ secrets.JAVA_ENTERPRISE_ID }} | ||
| JAVA_JWT_CONFIG: ${{ secrets.JAVA_JWT_CONFIG }} | ||
| JAVA_USER_ID: ${{ secrets.JAVA_USER_ID }} | ||
| run: ./gradlew integrationTest --stacktrace | ||
| - name: Smoke Tests | ||
| if: "!startsWith(github.head_ref, 'codegen-release')" | ||
| env: | ||
| JAVA_COLLABORATOR_ID: ${{ secrets.JAVA_COLLABORATOR_ID }} | ||
| JAVA_COLLABORATOR: ${{ secrets.JAVA_COLLABORATOR }} | ||
| JAVA_ENTERPRISE_ID: ${{ secrets.JAVA_ENTERPRISE_ID }} | ||
| JAVA_JWT_CONFIG: ${{ secrets.JAVA_JWT_CONFIG }} | ||
| JAVA_USER_ID: ${{ secrets.JAVA_USER_ID }} | ||
| run: ./gradlew smokeTest --stacktrace |
This file contains hidden or 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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -6,6 +6,8 @@ on: | |
| - opened | ||
| - edited | ||
| - synchronize | ||
| branches: | ||
| - combined-sdk | ||
|
|
||
| jobs: | ||
| main: | ||
|
|
||
This file contains hidden or 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 hidden or 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 hidden or 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.
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
Copilot Autofix
AI 8 months ago
To fix the issue, add a
permissionsblock to the workflow (either at the root or at the job level). This block limits the GITHUB_TOKEN permissions during the run, following least privilege. Based on the workflow's actions, it needs to be able to "read" repository contents and "write" to pull requests (since it updates PR branches and could interact with them or post commits). This matches the recommended minimal permissions for automation updating pull requests. You should add:immediately after the workflow
name:and beforeon:, which will apply to the whole workflow. No further code changes are needed, as this only modifies the workflow permissions.