PHOENIX (AP) -- Winning 10 games may seem like a modest goal for a pitcher. Not one who didn't make his first career start until May.
Josh Collmenter pitched seven strong innings and Miguel Montero had two RBIs to help the Arizona Diamondbacks beat the San Francisco Giants 5-2 on Sunday for a three-game sweep.
Collmenter (10-10) allowed five hits and two runs for his second win against the Giants this season. Collmenter struck out four and walked one.
"It's been one heck of a ride this year," Collmenter said.
Collmenter made one start with Triple-A Reno and seven appearances out of the bullpen before making his first start on May 14 at Los Angeles.
He's had both highs — a 12-inning scoreless streak to begin his career as a starter — and lows — a four-game midseason losing streak — while relying primarily on just two pitches, a fastball and a changeup.
"I worked on that third pitch (a curveball) to make it a weapon all the time," Collmenter said.
Aaron Hill and Colin Cowgill also had run-scoring hits for the Diamondbacks, who have won six of seven heading into a season-ending series against the Los Angeles Dodgers.
Though Arizona has clinched the NL West title, the Diamondbacks remain a game behind Milwaukee in an attempt to gain home-field advantage in the first round of the playoffs.
"Our intentions are to win out," Diamondbacks manager Kirk Gibson said. "We may. We may not. But wherever we have to go on Saturday, that's fine. It's good times. It's fun."
J.J. Putz pitched the ninth for his 45th save.
Diamondbacks right fielder Justin Upton was hit on the front of the helmet by Giants starter Tim Lincecum (13-14) in the first.
He initially remained in the game and scored Arizona's second run, but left after the inning for precautionary reasons. Neurological tests on Upton were negative and he is listed day to day.
"If you're going to get hit in the dome that's probably the best place," Putz said.
Carlos Beltran and Andres Torres homered in the sixth for the Giants, who have lost five of six including four straight.
"It was embarrassing," Giants manager Bruce Bochy said. "Matt (Cain) threw a great game (Friday) and it could have gone either way. But the last two, we were ugly. There is no getting around it. That is not the way we want to finish up."
The Diamondbacks took a 2-0 lead against Lincecum in the first. Hill drew a one-out walk and went to second when Upton was hit in the helmet. Both scored when Montero followed with a double into the right-center field gap.
"We've had good luck when guys hit J-Up this year," Gibson said. "Fortunately he hasn't been seriously injured, but we've done well in those situations."
Lincecum said the pitch to Upton affected his original game plan.
"I was kind of afraid to go in for fear that kind of stuff would happen again," said Lincecum, who approached the plate to check on Upton and also sent a message to the right fielder.
"I had one of the players send a message over there saying that it was a complete accident and I had no intention of doing that.
"I just kind of lost it. I was trying to go low and away and it was the complete opposite."
Paul Goldschmidt led off the fourth with a double to right and Cowgill made it 3-0 with a one-out double to right field.
Hill drove in Gerardo Parra on a ground-rule double in the fifth and scored on a ground out for a 5-0 lead.
Lincecum allowed five runs and eight hits with two walks and three strikeouts.