Skip to content

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

Merged
guibranco merged 30 commits into
mainfrom
gitauto/issue-285-20250912-171517-Z3jS
May 18, 2026
Merged

[FEATURE] Add DOTNET_AICOMMITMESSAGE_IGNORE_API_ERRORS environment variable to bypass AI API failures gracefully#287
guibranco merged 30 commits into
mainfrom
gitauto/issue-285-20250912-171517-Z3jS

Conversation

@gitauto-ai

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

Copy link
Copy Markdown
Contributor

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

korbit-ai Bot commented Sep 12, 2025

Copy link
Copy Markdown

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

coderabbitai Bot commented Sep 12, 2025

Copy link
Copy Markdown
Contributor

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

korbit-ai Bot commented Sep 12, 2025

Copy link
Copy Markdown

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

deepsource-io Bot commented Sep 12, 2025

Copy link
Copy Markdown

DeepSource Code Review

We reviewed changes in ba341b5...a9754e3 on this pull request. Below is the summary for the review, and you can see the individual issues we found as inline review comments.

See full review on DeepSource ↗

PR Report Card

Overall Grade   Security  

Reliability  

Complexity  

Hygiene  

Coverage  

Code Review Summary

Analyzer Status Updated (UTC) Details
Code coverage Apr 20, 2026 7:12a.m. Review ↗
Secrets Apr 20, 2026 7:12a.m. Review ↗
Docker Apr 20, 2026 7:12a.m. Review ↗
C# Apr 20, 2026 7:12a.m. Review ↗

Code Coverage Summary

Language Line Coverage (New Code) Line Coverage (Overall)
Aggregate
14.3%
46.1%
[▼ down 0.9% from main]
C#
14.3%
46.1%
[▼ down 0.9% from main]

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


Important

AI Review is run only on demand for your team. We're only showing results of static analysis review right now. To trigger AI Review, comment @deepsourcebot review on this thread.

@gstraccini gstraccini Bot added 🚦 awaiting triage Items that are awaiting triage or categorization 🤖 bot Automated processes or integrations labels Sep 12, 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
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

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

See analysis details on SonarQube Cloud

@codacy-production

codacy-production Bot commented Apr 1, 2026

Copy link
Copy Markdown

Not up to standards ⛔

🔴 Issues 1 minor

Alerts:
⚠ 1 issue (≤ 0 issues of at least minor severity)

Results:
1 new issue

Category Results
CodeStyle 1 minor

View in Codacy

🟢 Metrics 9 complexity · 0 duplication

Metric Results
Complexity 9
Duplication 0

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

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

See analysis details on SonarQube Cloud

@guibranco

Copy link
Copy Markdown
Owner

@gstraccini csharpier

@gstraccini

gstraccini Bot commented May 14, 2026

Copy link
Copy Markdown
Contributor

Running CSharpier on this branch! 🔧

@gstraccini

gstraccini Bot commented May 14, 2026

Copy link
Copy Markdown
Contributor

CSharpier result:

Error ./Tests/AiCommitMessage.Tests/Integration/DisableApiIntegrationTests.cs - Was not formatted.
  The file did not end with a single newline.
Error ./Tests/AiCommitMessage.Tests/Services/ApiErrorHandlingTests.cs - Was not formatted.
  The file did not end with a single newline.
Error ./Src/AiCommitMessage/Services/GenerateCommitMessageService.cs - Was not formatted.
  The file did not end with a single newline.
Checked 26 files in 808ms.

@gstraccini

gstraccini Bot commented May 14, 2026

Copy link
Copy Markdown
Contributor

ℹ️ Workflow Template updated!

A new workflow template has been added: .github/workflows/linter.yml

@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

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

See analysis details on SonarQube Cloud

@github-actions

Copy link
Copy Markdown
Contributor

Infisical secrets check: ✅ No secrets leaked!

💻 Scan logs
2026-05-18T13:09:19Z INF scanning for exposed secrets...
1:09PM INF 292 commits scanned.
2026-05-18T13:09:19Z INF scan completed in 79.7ms
2026-05-18T13:09:19Z INF no leaks found

@guibranco guibranco merged commit d987f35 into main May 18, 2026
18 of 21 checks passed
@guibranco guibranco deleted the gitauto/issue-285-20250912-171517-Z3jS branch May 18, 2026 13:10
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