-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into gitauto/issue-432-16721fcb-adbc-4cf7-b867-79…
…084d256b2c
- Loading branch information
Showing
203 changed files
with
14,513 additions
and
15,444 deletions.
There are no files selected for viewing
This file contains 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 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,10 +1,15 @@ | ||
version = 1 | ||
|
||
test_patterns = [ | ||
"Tests/**" | ||
] | ||
|
||
[[analyzers]] | ||
name = "csharp" | ||
|
||
[[analyzers]] | ||
name = "secrets" | ||
|
||
[[analyzers]] | ||
name = "test-coverage" | ||
name = "test-coverage" | ||
|
This file contains 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 @@ | ||
#!/bin/sh | ||
|
||
# This script generates an AI-powered commit message using dotnet-aicommitmessage. | ||
# It can be bypassed by setting the GIT_AICOMMIT_SKIP environment variable. | ||
|
||
# Exit immediately if GIT_AICOMMIT_SKIP is set | ||
if [ -n "$GIT_AICOMMIT_SKIP" ]; then | ||
exit 0 | ||
fi | ||
|
||
if ! command -v dotnet-aicommitmessage &> /dev/null; then | ||
echo "Error: dotnet-aicommitmessage is not installed or not in PATH" >&2 | ||
echo "Please install it by running 'dotnet tool install -g aicommitmessage'" >&2 | ||
exit 1 | ||
fi | ||
|
||
COMMIT_MSG_FILE=$1 | ||
CURRENT_MESSAGE=$(cat "$COMMIT_MSG_FILE") | ||
|
||
# From version 0.6.1, this is not needed anymore. | ||
# GIT_DIFF=$(git diff --staged) | ||
# GIT_BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD) | ||
|
||
# Run dotnet-aicommitmessage with error handling | ||
# From version 0.6.1 branch and diff are now retrieved by the tool and don't need to be passed manually. | ||
# Version 0.6.1 and higher: dotnet-aicommitmessage generate-message -m "$CURRENT_MESSAGE" | ||
# Version 0.6.0 and lower: dotnet-aicommitmessage generate-message -m "$CURRENT_MESSAGE" -b "$GIT_BRANCH_NAME" -d "$GIT_DIFF" | ||
|
||
if ! AI_MESSAGE=$(dotnet-aicommitmessage generate-message -m "$CURRENT_MESSAGE"); then | ||
echo "Error: Failed to generate AI commit message. Using original message." >&2 | ||
exit 0 | ||
fi | ||
|
||
if [[ -z "$AI_MESSAGE" || "$AI_MESSAGE" =~ ^[[:space:]]*$ ]]; then | ||
echo "Error: Generated commit message is empty." >&2 | ||
exit 1 | ||
fi | ||
echo "$AI_MESSAGE" > "$COMMIT_MSG_FILE" | ||
exit 0 |
This file contains 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,45 @@ | ||
name: "CodeQL" | ||
|
||
on: | ||
push: | ||
branches: ["main"] | ||
pull_request: | ||
branches: ["main"] | ||
schedule: | ||
- cron: "36 2 * * 2" | ||
|
||
jobs: | ||
analyze: | ||
name: Analyze | ||
runs-on: ubuntu-latest | ||
permissions: | ||
actions: read | ||
contents: read | ||
security-events: write | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
language: ["csharp"] | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up .NET | ||
uses: actions/setup-dotnet@v4 | ||
with: | ||
dotnet-version: '9.x' | ||
|
||
- name: Initialize CodeQL | ||
uses: github/codeql-action/init@v3 | ||
with: | ||
languages: ${{ matrix.language }} | ||
|
||
- name: Autobuild | ||
uses: github/codeql-action/autobuild@v3 | ||
|
||
- name: Perform CodeQL Analysis | ||
uses: github/codeql-action/analyze@v3 | ||
with: | ||
category: "security" |
This file contains 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 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,27 @@ | ||
name: InferSharp Analysis | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
analyze: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Run InferSharp | ||
uses: microsoft/[email protected] | ||
|
||
- name: Upload SARIF results | ||
if: success() && steps.infersharp.outputs.sarif-report | ||
uses: github/codeql-action/upload-sarif@v2 | ||
with: | ||
sarif_file: ${{ steps.infersharp.outputs.sarif-report }} | ||
continue-on-error: true |
This file contains 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 |
---|---|---|
|
@@ -23,4 +23,4 @@ jobs: | |
fetch-depth: 0 | ||
|
||
- name: Infisical secrets check | ||
uses: guibranco/[email protected].13 | ||
uses: guibranco/[email protected].21 |
This file contains 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 |
---|---|---|
|
@@ -2,7 +2,6 @@ name: Label based on PR size | |
|
||
on: | ||
pull_request: | ||
pull_request_target: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
|
@@ -17,12 +16,9 @@ jobs: | |
( | ||
github.event_name == 'pull_request' && | ||
github.event.pull_request.head.repo.full_name == github.repository | ||
) || ( | ||
github.event_name == 'pull_request_target' && | ||
github.event.pull_request.head.repo.full_name != github.repository | ||
) || ( | ||
github.event_name == 'workflow_dispatch' | ||
) | ||
uses: "pascalgn/[email protected].4" | ||
uses: "pascalgn/[email protected].5" | ||
env: | ||
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" |
This file contains 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 contains 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 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 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.