forked from Adeptus-Dominus/ChapterMaster
-
Notifications
You must be signed in to change notification settings - Fork 1
test1 #249
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
Open
EttyKitty
wants to merge
23
commits into
development
Choose a base branch
from
ci/gobo-tests
base: development
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+67
−0
Open
test1 #249
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
241d25d
Create gobo_format.yml
EttyKitty b87295a
Update gobo_format.yml
EttyKitty 7fed5b3
Update gobo_format.yml
EttyKitty eb757ac
test
EttyKitty 2628962
Update gobo_format.yml
EttyKitty 4d69db3
test2
EttyKitty 6d3798c
Update gobo_format.yml
EttyKitty 82cba14
Update gobo_format.yml
EttyKitty da3f83e
Update gobo_format.yml
EttyKitty a583980
Update gobo_format.yml
EttyKitty 0b34bea
test3
EttyKitty 7a0ba8a
Update gobo_format.yml
EttyKitty b9173cf
Update gobo_format.yml
EttyKitty fef76f2
Update gobo_format.yml
EttyKitty 1315cc5
Update gobo_format.yml
EttyKitty 91fac78
Update gobo_format.yml
EttyKitty a725707
Update gobo_format.yml
EttyKitty 24dcc95
Update gobo_format.yml
EttyKitty f40b197
Update gobo_format.yml
EttyKitty 02ca971
Update gobo_format.yml
EttyKitty 8d763bd
Update gobo_format.yml
EttyKitty 1998683
Discard changes to scripts/scr_add_man/scr_add_man.gml
EttyKitty 259997b
Update gobo_format.yml
EttyKitty 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,67 @@ | ||
| name: Format Code | ||
|
|
||
| on: | ||
| pull_request: | ||
| types: | ||
| - opened | ||
| - edited | ||
| - ready_for_review | ||
| - synchronize | ||
|
|
||
| jobs: | ||
| format: | ||
| runs-on: ubuntu-latest # Or 'windows-latest' if using Windows runner | ||
|
|
||
| steps: | ||
| - name: Checkout the repository | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Download Release | ||
| run: | | ||
| curl -LO https://github.com/Pizzaandy/Gobo/releases/download/v0.4.0/gobo-ubuntu.zip | ||
|
|
||
| - name: Extract ZIP | ||
| run: | | ||
| unzip gobo-ubuntu.zip | ||
|
|
||
| - name: Ensure executable permissions | ||
| run: | | ||
| chmod +x ./gobo | ||
|
|
||
| - name: Get Changed Files | ||
| id: changed_files | ||
| run: | | ||
| target_branch="${{ github.event.pull_request.base.ref }}" | ||
| pr_branch="${{ github.event.pull_request.head.ref }}" | ||
| echo "Target branch is $target_branch" | ||
| echo "PR branch is $pr_branch" | ||
|
|
||
| # Fetch the base branch and PR branch commit refs | ||
| git fetch origin $target_branch:$target_branch | ||
| git fetch origin $pr_branch:$pr_branch | ||
|
|
||
| # Store the result of the diff in the environment variable | ||
| changed_files=$(git diff --name-only origin/$target_branch...origin/$pr_branch) | ||
| echo "changed_files=$changed_files" >> $GITHUB_ENV | ||
|
|
||
| # Echo the contents of the changed_files variable | ||
|
|
||
| - name: Run Formatter on Changed Files | ||
| run: | | ||
| if [ -n "$changed_files" ]; then | ||
| # Iterate over each file using a for loop | ||
| for file in $changed_files; do | ||
| echo "Formatting $file" | ||
| ./gobo "$file" # Run formatter on each changed file | ||
| done | ||
| else | ||
| echo "No files changed, skipping formatting." | ||
| fi | ||
|
|
||
| - name: Clean up Gobo Files | ||
| run: | | ||
| rm -rf gobo-ubuntu.zip gobo | ||
|
|
||
| - name: Check for formatting changes | ||
| run: | | ||
| git diff --quiet --exit-code || exit 1 | ||
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Potential Security Risk in Branch Reference, nyan!
The use of
${{ github.event.pull_request.head.ref }}on line 35 is potentially untrusted per security guidelines. It is recommended to sanitize this input or pass it through an environment variable as advised by GitHub’s security hardening guides, nyan!🧰 Tools
🪛 actionlint (1.7.4)
33-33: "github.event.pull_request.head.ref" is potentially untrusted. avoid using it directly in inline scripts. instead, pass it through an environment variable. see https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions for more details
(expression)