- Log in to Git AI.
- Connect your repositories. During the initial connection, the OAuth app must be granted the requested permissions. After the connection is complete, you can reduce its permissions.
- In Microsoft Entra ID or Azure DevOps, remove the Write permission from the OAuth application.
- Create an API key with Admin Read permission and Telemetry Write permission
git ai config set api_key <value>- Run the skill from somewhere - make sure to include the repo you want to analyze in your prompt
This file contains hidden or 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
| use chrono::{DateTime, Utc}; | |
| use serde::{Deserialize, Serialize}; | |
| use std::collections::HashSet; | |
| use std::fs::File; | |
| use std::io::{Read, Write}; | |
| use std::path::PathBuf; | |
| use crate::authorship::post_commit::filter_untracked_files; | |
| use crate::authorship::stats::{ | |
| CommitStats, get_git_diff_stats, stats_for_commit_stats, stats_from_authorship_log, |
This file contains hidden or 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
| Apache License | |
| Version 2.0, January 2004 | |
| http://www.apache.org/licenses/ | |
| TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION | |
| 1. Definitions. | |
| "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. |
import { Callout } from "nextra-theme-docs";
Optic Capture helps create OpenAPI specifications and keep them up to date by examining the traffic to your API. Under the hood the following happens when running Capture,
- Your API is started via a command you provide.
- A reverse proxy is configured to send traffic to your API.
- A command or set of requests you provide is run, generating traffic to the proxy.
- Optic observes the traffic as it passes through the proxy.
This file contains hidden or 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
| import { | |
| ConceptualLocation, | |
| IChange, | |
| IPathComponent, | |
| OpenApiFact, | |
| OpenApiKind, | |
| OpenApiOperationFact, | |
| OpenApiRequestParameterFact, | |
| } from '../types'; | |
| import equals from 'lodash.isequal'; |
At Optic we work with a lot of different kinds of diffs. We call a diff between traffic and a spec, a "diff" and a diff between two versions of an OpenAPI document a "changelog"
Optic CI rules take advantage of this pipeline, which, also can support producing changelogs between any two OpenAPI files
- reads your disk / git repo to get the full spec, with all refs resolved
- compute facts about the API specification that are true, independent of formatting, ordering, etc. Notice how if you change the order of Operations in
optic-cithere's no changelog, even though there's a git diff. This is essential to making a real changelog, that works across a variety of use cases - facts are then compared to produce changes
- Optic CI Rules look for changes they care about and execute to give you results
If you stop at step 3, you have a changelog between the two files.
This file contains hidden or 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
| [{ | |
| "url": "https://api.stripe.com/v1/balance_transactions", | |
| "method": "GET", | |
| "request": { | |
| "headers_shape_hash": "286b9d7d500fd5de10ce6614a011a8ec0ea38102", | |
| "body": { | |
| "content-type": "application/json", | |
| "shape_hash": "421e6d804647dccef9e26bde65d120689ff2b28c" | |
| } | |
| }, |
This file contains hidden or 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
| What is the distribution of licesne fields? | |
| Sampling 355 APIs | |
| NONE : 276 | |
| Apache 2.0 : 15 | |
| MIT : 12 | |
| Apache 2.0 License : 3 | |
| Terms and Conditions : 2 | |
| Creative Commons : 2 |
This file has been truncated, but you can view the full file.
This file contains hidden or 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
| { | |
| "swagger": "2.0", | |
| "info": { | |
| "title": "undefined/mattermost-api4", | |
| "version": "2.0.0" | |
| }, | |
| "basePath": "/api/v4", | |
| "paths": { | |
| "/actions/dialogs/open": { | |
| "post": { |
NewerOlder