zeta: Collect git sha / remote urls when data collection from OSS is enabled (#35514)
Release Notes: - Edit Prediction: Added Git info to edit predictions requests (only sent for opensource projects when data collection is enabled). The sent Git info is the SHA of the current commit and the URLs for the `origin` and `upstream` remotes.
This commit is contained in:
parent
3df5394a8c
commit
68c24655e9
4 changed files with 70 additions and 2 deletions
|
@ -149,6 +149,22 @@ pub struct PredictEditsBody {
|
|||
pub can_collect_data: bool,
|
||||
#[serde(skip_serializing_if = "Option::is_none", default)]
|
||||
pub diagnostic_groups: Option<Vec<(String, serde_json::Value)>>,
|
||||
/// Info about the git repository state, only present when can_collect_data is true.
|
||||
#[serde(skip_serializing_if = "Option::is_none", default)]
|
||||
pub git_info: Option<PredictEditsGitInfo>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
pub struct PredictEditsGitInfo {
|
||||
/// SHA of git HEAD commit at time of prediction.
|
||||
#[serde(skip_serializing_if = "Option::is_none", default)]
|
||||
pub head_sha: Option<String>,
|
||||
/// URL of the remote called `origin`.
|
||||
#[serde(skip_serializing_if = "Option::is_none", default)]
|
||||
pub remote_origin_url: Option<String>,
|
||||
/// URL of the remote called `upstream`.
|
||||
#[serde(skip_serializing_if = "Option::is_none", default)]
|
||||
pub remote_upstream_url: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue