-
-
Notifications
You must be signed in to change notification settings - Fork 0
chore: Project structure #76
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
21 commits
Select commit
Hold shift + click to select a range
43fbccf
extract metal pkg
gocanto 8a2a050
extract kernel package
gocanto b342508
wip
gocanto f79366a
version
gocanto f68ca58
wip
gocanto 0adba74
fix fallen tests
gocanto 192b374
versions
gocanto c7d63ff
move cli package
gocanto 1242f12
env package
gocanto f329932
flow
gocanto 441f079
wip
gocanto 1471f48
bugs fix
gocanto c5dcb89
sentry recomendations
gocanto c37ffeb
makefile
gocanto 779e423
format
gocanto 846c176
wip
gocanto b46a168
wip
gocanto 6cd0d19
wip
gocanto a3f5f98
wip
gocanto a2a13e1
tweaks
gocanto 0dc58ac
formatter
gocanto 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 |
|---|---|---|
| @@ -1,29 +1,96 @@ | ||
| on: [pull_request] | ||
|
|
||
| name: Go Fmt | ||
|
|
||
| on: | ||
| pull_request: | ||
| types: [opened, synchronize, reopened, labeled] | ||
| push: | ||
| branches: | ||
| - main | ||
|
|
||
| permissions: | ||
| contents: write | ||
| pull-requests: write | ||
|
|
||
| jobs: | ||
| test: | ||
| gofmt: | ||
| strategy: | ||
| matrix: | ||
| go-version: [1.24.x] | ||
| go-version: [1.24.5] | ||
| os: [ubuntu-latest] | ||
|
|
||
| runs-on: ${{ matrix.os }} | ||
|
|
||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| ref: ${{ github.event_name == 'pull_request' && github.head_ref || github.ref }} | ||
| fetch-depth: 0 | ||
|
|
||
| - name: Install Go | ||
| uses: actions/setup-go@v5 | ||
| with: | ||
| go-version: ${{ matrix.go-version }} | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Run Formatter | ||
| run: gofmt -w -s . | ||
|
|
||
| - name: Commit Changes | ||
| uses: stefanzweifel/git-auto-commit-action@v4.0.0 | ||
| - name: Check for formatting changes (dry run) | ||
| if: ${{ github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'testing') }} | ||
| run: | | ||
| git diff --exit-code || echo "::warning::Formatting changes would be applied in normal mode" | ||
| continue-on-error: true | ||
|
|
||
gocanto marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| - name: Commit Changes to PR | ||
| if: ${{ github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'testing') }} | ||
| uses: stefanzweifel/git-auto-commit-action@v6.0.1 | ||
| with: | ||
| commit_message: apply coding style fixes | ||
| commit_options: '--no-verify' | ||
| file_pattern: . | ||
| repository: . | ||
| commit_user_name: GitHub Actions | ||
| commit_user_email: ${{ secrets.GUS_GH_EMAIL }} | ||
| commit_author: gocanto <gocanto@users.noreply.github.com> | ||
| branch: ${{ github.head_ref }} | ||
|
|
||
| - name: Create branch for formatting changes | ||
| if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} | ||
| run: | | ||
| # Check if there are any changes after formatting | ||
| if ! git diff --quiet; then | ||
| # Create a new branch with timestamp | ||
| BRANCH_NAME="gofmt-fixes-$(date +%Y%m%d-%H%M%S)" | ||
| git checkout -b $BRANCH_NAME | ||
|
|
||
| # Configure git | ||
| git config user.name "GitHub Actions" | ||
| git config user.email "${{ secrets.GUS_GH_EMAIL }}" | ||
|
|
||
| # Commit changes | ||
| git add . | ||
| git commit -m "Apply Go formatting fixes" | ||
|
|
||
| # Push the branch | ||
| git push origin $BRANCH_NAME | ||
|
|
||
| # Set output for next step | ||
| echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_ENV | ||
| echo "HAS_CHANGES=true" >> $GITHUB_ENV | ||
| else | ||
| echo "No formatting changes needed" | ||
| echo "HAS_CHANGES=false" >> $GITHUB_ENV | ||
| fi | ||
|
|
||
| - name: Create Pull Request | ||
| if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' && env.HAS_CHANGES == 'true' }} | ||
| uses: peter-evans/create-pull-request@v6 | ||
| with: | ||
| token: ${{ secrets.GITHUB_TOKEN }} | ||
| commit-message: Apply Go formatting fixes | ||
| title: "Auto: Apply Go formatting fixes" | ||
| body: | | ||
| This PR was automatically created by the Go Fmt GitHub Action. | ||
| It applies Go formatting standards to the codebase. | ||
| branch: ${{ env.BRANCH_NAME }} | ||
| base: 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
Empty file.
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| module github.com/oullin | ||
|
|
||
| go 1.24 | ||
| go 1.24.5 | ||
|
|
||
| require ( | ||
| github.com/getsentry/sentry-go v0.35.0 | ||
|
|
||
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
2 changes: 1 addition & 1 deletion
2
cli/accounts/factory_test.go → metal/cli/accounts/factory_test.go
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
File renamed without changes.
Oops, something went wrong.
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.