MCPcopy Create free account
hub / github.com/github/gh-aw / computeValueSum

Method computeValueSum

pkg/github/label_objective_mapping.go:76–83  ·  view source on GitHub ↗

computeValueSum adds all matching label values and logs the result.

(matchingValues []int, matchedLabels []string)

Source from the content-addressed store, hash-verified

74
75// computeValueSum adds all matching label values and logs the result.
76func (om *ObjectiveMapping) computeValueSum(matchingValues []int, matchedLabels []string) int {
77 total := 0
78 for _, v := range matchingValues {
79 total += v
80 }
81 labelObjectiveMappingLog.Printf("Computed objective value via sum: labels=%v, value=%d", matchedLabels, total)
82 return total
83}
84
85// computeValueFirst returns the value for the first issue label that appears in PriorityLabels.
86// It iterates issueLabels in their existing order and returns the value for the first one

Callers 1

ComputeObjectiveValueMethod · 0.95

Calls 1

PrintfMethod · 0.45

Tested by

no test coverage detected