Skip to content
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

Action should not fail credentials are not provided for ChatClient #6

Merged
merged 2 commits into from
Oct 13, 2024

Conversation

ardacetinkaya
Copy link
Owner

@ardacetinkaya ardacetinkaya commented Oct 13, 2024

Related to #5


For more details, open the Copilot Workspace session.

@ardacetinkaya
Copy link
Owner Author

.github/workflows/summarizePR.yml

  • Added a step to check for the presence of the AI_API_KEY secret. If not provided, the action is skipped, avoiding unnecessary execution.

src/Summarize.PR/Program.cs

  • Refactored the main program to check for the presence of the APIKey before attempting to create a ChatCompletionsClient.
  • Introduced a condition to skip ChatClient operations if the APIKey is missing.
  • Enhanced logging to inform whether the API Key or Commit SHA is missing, providing better insights during execution.

@ardacetinkaya
Copy link
Owner Author

File: .github/workflows/summarizePR.yml

  • Updated Step Name: Changed the name of the step that checks for API keys to include "Action Token" as well.
  • Added Token Check: Introduced a new check for the presence of the ACTION_TOKEN secret. If it is not available, the action now skips execution with a message indicating the absence of the Action Token.

@ardacetinkaya ardacetinkaya merged commit 6874f43 into main Oct 13, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant