Uh oh!
There was an error while loading. Please reload this page.
Conversation
suztomo
commented
Sep 23, 2022
How about limiting first 1000 diff files in the pull request? (We can't see thousands of files anyway) Once the script is ready and merged to main, we want a GitHub Actions job that updates a branch periodically. We monitor a pull request from the branch to observe the changes. |
suztomo
commented
Sep 23, 2022
I didn't want to manually limit/exclude certain files. I've taken a look at a few of the diffs locally and I think quite a few of them can be ignored. Ignoring these files should help us limit the number of diffs we need to check:
Need to check:
The pom.xml files shouldn't have custom pom.xml, but I can do a separate and specific diff (either in a new PR or a seperate branch) to check each pom.xml. What do you think about the proposed ignored files above? @suztomo
I can look into a GH action once I flush out the script with the diffs that I want to show. |
lqiu96
commented
Sep 23, 2022
Plan forward is two branches
Script will create two branches and create PRs for each branch that show the diffs |
We need 1 script generation/generate_diff.sh. The two jobs that run upon updating main branch: 1st GitHub Actions job2nd GitHub Actions job |
| git stash | ||
| git checkout "${current_branch}" | ||
| git stash pop | ||
| git checkout -b "${diff_non_java_branch}" | ||
| git add . |
There was a problem hiding this comment.
I like the use of git stash to separete Java change and non-Java changes.
There was a problem hiding this comment.
Let me know if you have a better option. I couldn't think besides this that wouldn't require either two jobs or running the script twice.
| - name: Run generate-diff script | ||
| run: ./generation/generate_diff.sh | ||
| env: | ||
| USERNAME: ${{ github.actor }} |
There was a problem hiding this comment.
Did it work? If not YOSHI_CODE_BOT_TOKEN is available.
| push: | ||
| branches: | ||
| - main | ||
| pull_request: |
There was a problem hiding this comment.
I assume you're testing. We don't need this job at pull request checks.
There was a problem hiding this comment.
Yep! Just added in fa84ab5 so the CI only runs on non-PR push events (should be merge only)
There was a problem hiding this comment.
Would you explain why you need this line 19 " pull_request:" ?
There was a problem hiding this comment.
I can skip it from running all together.
Yes, please do so. Remove line 19.
There was a problem hiding this comment.
Ah good catch! I've removed the check.
the job is appearing pull request checks
lqiu96
commented
Sep 26, 2022
I'll merge this now to have it regenerate the diffs on merge. I'll create a separate PR to split the ITs and other Java code. |
* chore: Generate diff from current split repos * chore: Call delete samples script afterwards * chore: Display diff on GH * chore: Push diffs to seperate branches * Revert "chore: Display diff on GH" This reverts commit 8a616dc. * chore: Create seperate branches * chore: Add push to multiple branches * chore: Stash the non staged changes * chore: Delete non-generated samples * chore: Add retry for git clone * chore: Remove untracked filed * chore: Run from main-diff branch * chore: Fix Typo * chore: cleanup branches * chore: Test if it can ci works * chore: Delete branch only if doesn't exist * chore: Set git username/email * chore: Use fetch-depth 0 to allow unshallow update * chore: Only run on merge * chore: Run action only on merge * chore: Remove run on pull_request



Following Tomo's script advice:
For now:
pom.xmlsgit diff --name-only origin/main | grep -v "pom.xml" | grep -v "CHANGELOG.md" | grep -v "README.md" | grep -v "renovate.json" | grep -v "versions.txt" | grep -v "samples/*" > diff.txtProbably should ignore owlbot files and .github/*
Shows only the name of the files that have changed: diff.txt
Github has issue displaying the diffs. Might need to only add the files listed in the diff.txt