package groups import ( "encoding/base64" "git.novox.be/novox/mesh-delivery/modules/mesh-delivery-forge-bridge/forgemsg" ) // The state performed keeps one key per owed act the bridge performed, its outcome and when, and the pull request the // act names, nothing more (novox/hq design 47 G §163, H-A-181, H-A-182): the act itself stays in the stream owed of the // seat that said it, its one copy, where bridge_owed_again reads it again. The bridge writes it; its tools read it. // PerformedKey is the key of one act in performed: the seat that said it and its id, the id in unpadded base64url, since // an id may hold what a key may not (`#`, `/`). func PerformedKey(of, id string) string { return of + "." + base64.RawURLEncoding.EncodeToString([]byte(id)) } // Performed is one value of the state performed (§163, H-A-182): the outcome said as owed.ended, with when, and the // repository and number of the pull request the act names, so bridge_owed reads one pull request's acts and // bridge_owed_again finds the act on its pull request's subject of the stream owed (H-A-181). type Performed struct { Ended forgemsg.OwedEnded `json:"ended"` Repository string `json:"repository,omitempty"` Number int `json:"number,omitempty"` }