Skip to content

Commit

Permalink
[chore] Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
constantincerdan committed Dec 1, 2024
1 parent 64890ce commit ec892b4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@ It can also be integrated with **Jira** to fetch titles for any ticket numbers f

Place Anno as the **last job** in your workflow to ensure it runs only after all other jobs complete successfully.

The minimum required inputs to get going are `chat_gpt_api_key` and `slack_webhook_url`.

```yaml
uses: The-Sole-Supplier/anno
uses: The-Sole-Supplier/anno@v1
with:
# App name for the Slack message.
# Default: Repository name.
Expand Down Expand Up @@ -44,9 +46,10 @@ with:
# Required.
slack_webhook_url: ""
```
## Monorepo Usage
There should be no special setup required for monorepos. Anno will download the workflow file and use the [`on.push.paths`](https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#example-including-paths) property to determine which files and commits to include in its analysis:
There shouldn't be any special setup required for monorepos. Anno will download the workflow file and use the [`on.push.paths`](https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#example-including-paths) property to determine which files and commits to include in its analysis:

```yaml
on:
Expand Down
4 changes: 2 additions & 2 deletions shared/src/ai/chat_gpt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ impl Ai for ChatGpt {
async fn make_request(system_input: &str, user_input: String) -> Result<String> {
let base_url = config::get("CHAT_GPT_BASE_URL");
let api_key = config::get("CHAT_GPT_API_KEY");
let model = config::get_optional("CHAT_GPT_MODEL").unwrap_or_else(|| "latest".to_string());
let model = config::get_optional("CHAT_GPT_MODEL");

let mut response = reqwest::Client::new()
.post(format!("{base_url}/chat/completions"))
.header("content-type", "application/json")
.bearer_auth(api_key)
.json(&json!({
"model": model,
"model": model.unwrap_or_else(|| "gpt-4o".to_string()),
"temperature": 0.0,
"frequency_penalty": 1.0,
"messages": [
Expand Down
2 changes: 0 additions & 2 deletions shared/src/services/github.rs
Original file line number Diff line number Diff line change
Expand Up @@ -682,8 +682,6 @@ impl WorkflowRun {
}

async fn get_prev_attempt(&self) -> Result<Option<WorkflowRun>, AppError> {
tracing::info!("Fetching previous '{}' workflow attempt", &self.name);

let gh_token = AccessToken::get().await?;

let Some(prev_attempt_url) = &self.previous_attempt_url else {
Expand Down

0 comments on commit ec892b4

Please sign in to comment.