Skip to content

Where people and agents ship software together. The open-source git platform for the whole job: issues, agents, checks and deploys to the edge.

g1t.sh

Commit

Work's merge_gate is gone: nothing called it once showing a pull request took the gate with what it already knows (merge_gate_seen, 6e24edf2), and the compiler said so on every build. Merging and the queue use merge_gate_by and queue_landing_gate as before; the comments that named merge_gate name those now. Checked: cargo test -p g1t-work (193 passing).

G1t-Session:
ses_01m4y12gdde2r9q832m7xk87kd
syntaqxcommitted Parent5fd6a02Browse files
3 files+7−190/3 viewed
+1−1
6969
7070 /// Whether a merge that was brought up to date lands now, by its new
7171 /// commit's checks. The same checks hold it as hold any merge
72−/// (`merge_gate`): landing it before they report would only be refused.
72+/// (`merge_gate_by`): landing it before they report would only be refused.
7373 pub(crate) fn landing_step(facts: &WorkflowFacts) -> Landing {
7474 let failed = facts.required_failed();
7575 if !failed.is_empty() {
+5−17
788788 }
789789
790790 /// Everything a merge of `pull` is judged on, and the judgement, for
791− /// `actor`, or for nobody in particular. A bypass counts only with
792− /// `honor_bypass`: a person merging asks for it (`bypass_rules`).
793− pub(crate) async fn merge_gate(
794− &self,
795− repo: &Repo,
796− pull: &Pull,
797− actor: Option<&User>,
798− ignore_checks: bool,
799− honor_bypass: bool,
800− ) -> Result<Gate> {
801− self.merge_gate_at(repo, pull, actor, ignore_checks, honor_bypass, None, None, None).await
802− }
803−
804− /// `merge_gate` with whether it is behind already worked out (from
805− /// what was stored with its mergeability, or asked once for this
806− /// request), so that showing a pull request does not ask repos again.
791+ /// `actor`, or for nobody in particular, as a pull request is shown:
792+ /// bypasses count, and whether it is behind is what was already worked
793+ /// out (stored with its mergeability, or asked once for this request),
794+ /// so showing it does not ask repos again.
807795 pub(crate) async fn merge_gate_seen(&self, repo: &Repo, pull: &Pull, actor: Option<&User>, behind: bool) -> Result<Gate> {
808796 self.merge_gate_at(repo, pull, actor, false, true, None, None, Some(behind)).await
809797 }
810798
811− /// `merge_gate` for a merge by `method`: rules that allow only some
799+ /// The gate for a merge by `method`, asking repos whether it is behind: rules that allow only some
812800 /// methods, and linear history, judge it too. Without a method they do
813801 /// not, as for showing what a pull request still needs.
814802 pub(crate) async fn merge_gate_by(
+1−1
33 //! protection" ruleset (rulesets.rs).
44 //!
55 //! What a merge needs is decided by the rules of the branch it merges into
6−//! (`Work::merge_gate`); `approvals_gap` asks them for what people must
6+//! (`Work::merge_gate_by`, `Work::merge_gate_seen`); `approvals_gap` asks them for what people must
77 //! still do, as g1t sees it when it merges by itself.
88
99 use g1t_contracts::time::rfc3339;

Comments

Sign in to comment.