diff options
| author | Jeff Carr <[email protected]> | 2025-09-07 22:47:26 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-09-07 22:48:58 -0500 |
| commit | 5e71dd3ecc32d2eb2c81825c7c14e4cc6e1c747d (patch) | |
| tree | 51c9d7640609302e42685fd143c24ae8293931eb /handlePatches.go | |
| parent | 873cb39932ae90fa9dac5415b08fd687c8ef3199 (diff) | |
add "/applied" and "/merged" routesv0.0.24
Diffstat (limited to 'handlePatches.go')
| -rw-r--r-- | handlePatches.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/handlePatches.go b/handlePatches.go index d5b12a9..a968b7b 100644 --- a/handlePatches.go +++ b/handlePatches.go @@ -19,6 +19,16 @@ func addNewPatches(pb *forgepb.Patches, reqPB *httppb.HttpRequest) *forgepb.Patc return newPatchesPB } +func handleMergedPatches(pb *forgepb.Patches, reqPB *httppb.HttpRequest) *forgepb.Patches { + newPatchesPB := new(forgepb.Patches) + for newpatch := range pb.IterAll() { + if expirePatch(newpatch) { + newPatchesPB.Append(newpatch) + } + } + return newPatchesPB +} + func sendPendingPatches(pb *forgepb.Patches, reqPB *httppb.HttpRequest) *forgepb.Patches { allPatchesPB := new(forgepb.Patches) for pset := range me.forge.Patchsets.IterAll() { |
