-
Notifications
You must be signed in to change notification settings - Fork 14
refactor(test): auto-commit regenerated snapshots #4321
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
mfranzke
merged 96 commits into
main
from
refactor-test-auto-commit-regenerated-snapshots
Jun 11, 2025
Merged
Changes from 90 commits
Commits
Show all changes
96 commits
Select commit
Hold shift + click to select a range
fe69a3d
refactor(test): auto-commit regenerated snapshots
mfranzke 7ad0ae6
chore: code structure
mfranzke 7470e90
refactor: testing our functionality
mfranzke 19b1cb6
chore: another try
mfranzke 7666798
chore: let's try this first
mfranzke 7ec1869
chore: another try
mfranzke bb27550
chore: another try
mfranzke 0afe039
refactor: another try
mfranzke 490f855
chore: another try
mfranzke 9e94d26
refactor: another try
mfranzke 5eb32e3
refactor: another try
mfranzke fb027be
chore: let's give this a try
mfranzke b83d771
chore: we won't need this
mfranzke 1253ea2
Revert "chore: let's give this a try"
mfranzke 4051578
refactor: let's give this a try
mfranzke 99fb529
refactor(test): updated snapshots
github-actions[bot] 80ace0f
refactor: another try
mfranzke aebdead
Revert "refactor(test): updated snapshots"
mfranzke 8e4c9b2
refactor: let's give this a try
mfranzke 38971d2
chore: corrected that
mfranzke 2a9ffbe
refactor(test): updated snapshots
github-actions[bot] e7c7523
Revert "refactor(test): updated snapshots"
mfranzke 60ce76e
refactor: corrected this aspect
mfranzke a499906
chore: another try
mfranzke 3106211
refactor: another try
mfranzke 4dd2cd4
refactor(test): updated snapshots
github-actions[bot] d196a69
Update 02-e2e-regenerate.yml
mfranzke 476de11
Update infotext.scss
mfranzke ff9d69f
refactor(test): updated snapshots
github-actions[bot] 880ac88
Update 02-e2e-regenerate.yml
mfranzke 572b877
Revert "Update infotext.scss"
mfranzke 4db32e5
refactor: using PAT
mfranzke 2acb64f
refactor: let's make this conditionally
mfranzke 409222b
Update 02-e2e-regenerated-snapshots-commit.yml
mfranzke 260b6ed
Update 02-e2e-regenerated-snapshots-commit.yml
mfranzke 043f237
Update 02-e2e-regenerated-snapshots-commit.yml
mfranzke ff6542d
Update 02-e2e-regenerated-snapshots-commit.yml
mfranzke cfa06ff
fix: naming
mfranzke 032f3e1
refactor: another try
mfranzke 8f38ad8
refactor: another try
mfranzke 7f8c791
fix: naming
mfranzke 064ccf6
refactor(test): updated snapshots
github-actions[bot] dae346d
Revert "refactor(test): updated snapshots"
mfranzke d330954
fix: path
mfranzke d4dfabd
refactor(test): updated snapshots
github-actions[bot] f84c6a1
Revert "refactor(test): updated snapshots"
mfranzke c27e494
refactor: using a real user
mfranzke 3f4537e
refactor(test): updated snapshots
mfranzke f4c8132
refactor: another try
mfranzke eac0328
Merge branch 'refactor-test-auto-commit-regenerated-snapshots' of htt…
mfranzke ea1d5f4
Revert "refactor(test): updated snapshots"
mfranzke 945e0ed
refactor(test): updated snapshots
mfranzke 09ddebd
refactor: another try
mfranzke 986d6ac
Merge branch 'refactor-test-auto-commit-regenerated-snapshots' of htt…
mfranzke ad0a559
Revert "refactor(test): updated snapshots"
mfranzke 4bc903c
Update 02-e2e-regenerated-snapshots-commit.yml
mfranzke 3747b9d
Update 02-e2e-regenerated-snapshots-commit.yml
mfranzke 4d1724f
Update 02-e2e-regenerated-snapshots-commit.yml
mfranzke 1ab1e3f
chore: update e2e-regenerate-snapshots-commit
nmerget c7ab5f2
Merge branch 'main' into refactor-test-auto-commit-regenerated-snapshots
nmerget a0917f6
Merge branch 'main' into refactor-test-auto-commit-regenerated-snapshots
mfranzke 117ad6b
Update .github/workflows/default.yml
mfranzke 57444a9
chore: we won't need an approval
mfranzke 4c6654d
Update 02-e2e-regenerated-snapshots-commit.yml
mfranzke 652c7e7
Update 02-e2e-regenerated-snapshots-commit.yml
mfranzke 77d9345
Apply suggestions from code review
mfranzke cbdc15b
Merge branch 'main' into refactor-test-auto-commit-regenerated-snapshots
mfranzke 056323b
Update 02-e2e-regenerated-snapshots-commit.yml
mfranzke c6582ea
Revert "Update 02-e2e-regenerated-snapshots-commit.yml"
mfranzke 0aa6143
refactor: another try
mfranzke fb84de3
Reapply "Update 02-e2e-regenerated-snapshots-commit.yml"
mfranzke 5e4cda1
Revert "refactor: another try"
mfranzke a6023d1
refactor: another try
mfranzke 7756f48
refactor: another try
mfranzke 842cd45
refactor: another try
mfranzke 96ca74d
auto update snapshots (#4355)
github-actions[bot] bd8ebe7
Revert "auto update snapshots (#4355)"
mfranzke 8b18222
refactor: another try
mfranzke d78f648
Revert "refactor: another try"
mfranzke 091ab3b
refactor: back for good
mfranzke 8035801
chore: update 02-e2e-regenerated-snapshots-commit.yml
nmerget 261cc72
fix: order
mfranzke 65dc04b
fix: issue with wrong if statement
nmerget d43f674
chore: check why if is not triggered
nmerget d497e41
chore: trigger commit-regenerated-snapshots always
nmerget 3070914
auto update snapshots (#4361)
github-actions[bot] 71ab3dc
Update infotext.scss
mfranzke aef5f23
auto update snapshots (#4362)
github-actions[bot] 3f93049
Merge branch 'main' into refactor-test-auto-commit-regenerated-snapshots
mfranzke 045b7d9
Update 02-e2e-regenerated-snapshots-commit.yml
mfranzke 482a395
Update 00-init.yml
mfranzke 1b5ddd9
Update infotext.scss
mfranzke d30c02f
auto update snapshots (#4363)
github-actions[bot] 68af93d
Update infotext.scss
mfranzke 5ca4dd3
Merge branch 'main' into refactor-test-auto-commit-regenerated-snapshots
mfranzke fd27a05
auto update snapshots (#4364)
github-actions[bot] 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
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
100 changes: 100 additions & 0 deletions
100
.github/workflows/02-e2e-regenerated-snapshots-commit.yml
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,100 @@ | ||
| name: Commit Regenerated Snapshots | ||
|
|
||
| on: | ||
| workflow_call: | ||
| inputs: | ||
| components: | ||
| description: "Regenerate snapshots for components" | ||
| required: true | ||
| type: boolean | ||
| foundations: | ||
| description: "Regenerate snapshots for foundations" | ||
| required: true | ||
| type: boolean | ||
| patternhub: | ||
| description: "Regenerate snapshots for patternhub" | ||
| required: true | ||
| type: boolean | ||
| showcases: | ||
| description: "Regenerate snapshots for showcases" | ||
| required: true | ||
| type: boolean | ||
|
|
||
| jobs: | ||
| commit-showcases: | ||
| name: 🆙 Commit regenerated snapshots | ||
| if: (inputs.showcases || inputs.components || inputs.foundations || inputs.patternhub) && !contains(github.actor,'[bot]') | ||
| runs-on: ubuntu-24.04 # Use Ubuntu 24.04 explicitly | ||
| permissions: | ||
| contents: write | ||
| pull-requests: write | ||
| env: | ||
| NEW_PR_BRANCH: "${{ github.head_ref }}-auto" | ||
| steps: | ||
| - name: ⏬ Checkout repo | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| ref: ${{ github.head_ref }} | ||
|
|
||
| - name: ⏬ Download components | ||
| uses: actions/download-artifact@v4 | ||
| # Only download artifact if the artifact exists | ||
| if: inputs.components | ||
| with: | ||
| name: snapshots-components | ||
| path: ./__snapshots__/ | ||
|
|
||
| - name: ⏬ Download foundations | ||
| uses: actions/download-artifact@v4 | ||
| # Only download artifact if the artifact exists | ||
| if: inputs.foundations | ||
| with: | ||
| name: snapshots-foundations | ||
| path: ./__snapshots__/ | ||
|
|
||
| - name: ⏬ Download patternhub | ||
| uses: actions/download-artifact@v4 | ||
| if: inputs.patternhub | ||
| with: | ||
| name: snapshots-patternhub | ||
| path: ./__snapshots__/ | ||
|
|
||
| - name: ⏬ Download showcase | ||
| uses: actions/download-artifact@v4 | ||
| if: inputs.showcases | ||
| with: | ||
| name: snapshots-showcases | ||
| path: ./__snapshots__/ | ||
|
|
||
| # https://docs.github.com/en/apps/creating-github-apps/authenticating-with-a-github-app/making-authenticated-api-requests-with-a-github-app-in-a-github-actions-workflow | ||
| - name: 🧬 Generate a token | ||
| id: generate-token | ||
| uses: actions/create-github-app-token@v2 | ||
| with: | ||
| app-id: ${{ vars.AUTO_MERGE_APP_ID }} | ||
| private-key: ${{ secrets.AUTO_MERGE_PRIVATE_KEY }} | ||
|
|
||
| - name: 🏗️ Create new branch and commit changes | ||
| env: | ||
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| run: | | ||
| git config --global user.name "github-actions[bot]" | ||
| git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" | ||
|
|
||
| git checkout -b "$NEW_PR_BRANCH" | ||
| git add __snapshots__/* | ||
|
|
||
| # We can't use semantic commits here because of the if statement in the workflow | ||
| git commit --no-verify -m "auto update snapshots" | ||
| git push -f origin "$NEW_PR_BRANCH" | ||
|
|
||
| - name: 🪗 Create Pull Request | ||
| env: | ||
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| run: | | ||
| gh pr create --base ${{ github.head_ref }} --head "$NEW_PR_BRANCH" --title "Automated PR: Auto update snapshots" --body "This PR was created automatically by a GitHub Action." | ||
|
|
||
| - name: 🤖 Squash the PR | ||
| run: gh pr merge --squash "$NEW_PR_BRANCH" | ||
| env: | ||
| GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }} |
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.
Uh oh!
There was an error while loading. Please reload this page.