Skip to content

[FEATURE] Add DOTNET_AICOMMITMESSAGE_IGNORE_API_ERRORS environment variable to bypass AI API failures gracefully#287

Open
gitauto-ai[bot] wants to merge 23 commits intomainfrom
gitauto/issue-285-20250912-171517-Z3jS
Open

[FEATURE] Add DOTNET_AICOMMITMESSAGE_IGNORE_API_ERRORS environment variable to bypass AI API failures gracefully#287
gitauto-ai[bot] wants to merge 23 commits intomainfrom
gitauto/issue-285-20250912-171517-Z3jS

Conversation

@gitauto-ai
Copy link
Contributor

@gitauto-ai gitauto-ai bot commented Sep 12, 2025

Resolves #285

Summary

Introduce the DOTNET_AICOMMITMESSAGE_IGNORE_API_ERRORS environment variable to allow graceful fallback when AI API calls fail.

Changes

  • Added a new environment variable check for DOTNET_AICOMMITMESSAGE_IGNORE_API_ERRORS.
  • Updated API error handling to catch exceptions and log a warning when the variable is active.
  • Implemented a fallback to continue processing and return the original or partially transformed message without interrupting the workflow.
git fetch origin
git checkout gitauto/issue-285-20250912-171517-Z3jS
git pull origin gitauto/issue-285-20250912-171517-Z3jS

@korbit-ai
Copy link

korbit-ai bot commented Sep 12, 2025

By default, I don't review pull requests opened by bots. If you would like me to review this pull request anyway, you can request a review via the /korbit-review command in a comment.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Sep 12, 2025

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

  • 🔍 Trigger a full review

Comment @coderabbitai help to get the list of available commands and usage tips.

@korbit-ai
Copy link

korbit-ai bot commented Sep 12, 2025

I was unable to write a description for this pull request. This could be because I only found files I can't scan.

@github-actions github-actions bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Sep 12, 2025
@gstraccini gstraccini bot added Documentation enhancement New feature or request gitauto GitAuto label to trigger the app in a issue. good first issue Good for newcomers hacktoberfest Participation in the Hacktoberfest event help wanted Extra attention is needed ✨ feature New feature requests or implementations 👷🏼 infrastructure Infrastructure-related tasks or issues 📝 documentation Tasks related to writing or updating documentation 🕓 medium effort A task that can be completed in a few hours 🚀 performance Performance optimizations or regressions 🚨 security Security-related issues or improvements 🧪 tests Tasks related to testing labels Sep 12, 2025
@deepsource-io
Copy link

deepsource-io bot commented Sep 12, 2025

DeepSource Code Review

DeepSource reviewed changes in the commit range 58cad28..9944c67 on this pull request. Below is the summary for the review, and you can see the individual issues we found as review comments.

For detailed review results, please see the PR on DeepSource ↗

PR Report Card

Security × 0 issues Overall PR Quality   

Focus Area: Reliability

Guidance
Address the use of a generic `Exception` catch in Src/AiCommitMessage/Services/GenerateCommitMessageService.cs.
Reliability × 1 issue
Complexity × 0 issues
Hygiene × 0 issues
Coverage × 2 issues

Code Review Summary

Analyzer Status Summary Details
Test coverage 2 new issues detected. Review ↗
Secrets No new issues detected. Review ↗
Docker No new issues detected. Review ↗
C# 1 new issue detected. Review ↗
How are these analyzer statuses calculated?

Administrators can configure which issue categories are reported and cause analysis to be marked as failed when detected. This helps prevent bad and insecure code from being introduced in the codebase. If you're an administrator, you can modify this in the repository's settings.

Code Coverage Summary

Language Line Coverage Branch Coverage
New Code Overall New Code Overall
Aggregate
14.3%
46.1%
[▼ down 0.9% from main]
0%
42.9%
[▼ down 3.3% from main]
C#
14.3%
46.1%
[▼ down 0.9% from main]
0%
42.9%
[▼ down 3.3% from main]

➟ Additional coverage metrics may have been reported. See full coverage report ↗

@gstraccini gstraccini bot added 🚦 awaiting triage Items that are awaiting triage or categorization 🤖 bot Automated processes or integrations labels Sep 12, 2025
@github-actions github-actions bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Sep 12, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Sep 12, 2025

🔥 Formatting issues detected

File Line

⚡ Please run dotnet csharpier . locally to fix the formatting issues.

@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
7.7% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

@guibranco guibranco removed the 🚦 awaiting triage Items that are awaiting triage or categorization label Nov 21, 2025
@guibranco guibranco changed the title [FEATURE] Add DOTNET_AICOMMITMESSAGE_IGNORE_API_ERRORS environment variable to bypass AI API failures gracefully [FEATURE] Add DOTNET_AICOMMITMESSAGE_IGNORE_API_ERRORS environment variable to bypass AI API failures gracefulli Jan 12, 2026
@guibranco guibranco changed the title [FEATURE] Add DOTNET_AICOMMITMESSAGE_IGNORE_API_ERRORS environment variable to bypass AI API failures gracefulli [FEATURE] Add DOTNET_AICOMMITMESSAGE_IGNORE_API_ERRORS environment variable to bypass AI API failures gracefully Jan 12, 2026
@github-actions
Copy link
Contributor

Infisical secrets check: ✅ No secrets leaked!

💻 Scan logs
2026-02-16T06:59:50Z INF scanning for exposed secrets...
6:59AM INF 265 commits scanned.
2026-02-16T06:59:50Z INF scan completed in 76.9ms
2026-02-16T06:59:50Z INF no leaks found

@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
7.7% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🤖 bot Automated processes or integrations 📝 documentation Tasks related to writing or updating documentation Documentation enhancement New feature or request ✨ feature New feature requests or implementations gitauto GitAuto label to trigger the app in a issue. good first issue Good for newcomers hacktoberfest Participation in the Hacktoberfest event help wanted Extra attention is needed 👷🏼 infrastructure Infrastructure-related tasks or issues 🕓 medium effort A task that can be completed in a few hours 🚀 performance Performance optimizations or regressions 🚨 security Security-related issues or improvements size/L Denotes a PR that changes 100-499 lines, ignoring generated files. 🧪 tests Tasks related to testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] Add DOTNET_AICOMMITMESSAGE_IGNORE_API_ERRORS environment variable to bypass AI API failures gracefully

1 participant

Comments