hive-c0re: a refused rev is an error log + Grafana alert, not a PR comment
A deploy request whose rev hive-c0re refuses (fetch failed, or the rev does not descend from applied/main) no longer tries to comment on the PR that merged it. Off the forge host that attempt always failed with "forge core token absent". The refusal now logs at ERROR, message unchanged, and the new `hh-config-rev-refused` Grafana rule fires on it. Deleted with the posting: actions::post_rev_deploy_failure_to_pr, the whole forge/pr_comment.rs (config_repo, merged_pr_for_commit, post_pr_comment), and ReaderToken::value, whose only caller was merged_pr_for_commit. Refs #4851
This commit is contained in:
parent
3d81266483
commit
8c222f8910
9 changed files with 27 additions and 106 deletions
|
|
@ -30,11 +30,6 @@ impl std::fmt::Debug for ReaderToken {
|
|||
}
|
||||
|
||||
impl ReaderToken {
|
||||
/// The token itself, for an API client.
|
||||
pub fn value(&self) -> &str {
|
||||
&self.value
|
||||
}
|
||||
|
||||
/// The `http.extraHeader` value for git; see [`basic_auth_header`].
|
||||
pub fn auth_header(&self) -> String {
|
||||
basic_auth_header(&self.login, &self.value)
|
||||
|
|
@ -121,14 +116,14 @@ mod tests {
|
|||
#[test]
|
||||
fn the_store_wins_over_the_core_file() {
|
||||
let t = pick(Some(stored()), Some("from-the-file".to_owned())).expect("a token");
|
||||
assert_eq!(t.value(), "from-the-store");
|
||||
assert_eq!(t.value, "from-the-store");
|
||||
assert_eq!(t.login, "hive-alpha");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn the_core_file_is_the_fallback() {
|
||||
let t = pick(None, Some("from-the-file".to_owned())).expect("a token");
|
||||
assert_eq!(t.value(), "from-the-file");
|
||||
assert_eq!(t.value, "from-the-file");
|
||||
assert_eq!(t.login, CORE_LOGIN);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue