That came to an abrupt end Tuesday night.
Chris Heston's first career complete game was a two-hitter and he struck out 10 as the San Francisco Giants won for the third time in four games with an 8-1 victory over the Astros.
McHugh (4-1) allowed seven runs — three earned — and seven hits in 4 2-3 innings.
"It was pretty much tough from the get-go," McHugh said. "Command wasn't there, stuff wasn't there. Makes for a pretty bad combination."
McHugh (4-1) lost for the first time since August 2014.
"It's over now, right? So we can stop talking about it? Good," McHugh said of the streak. "I was OK in the bullpen. Stuff-wise, there wasn't anything behind the ball today. Velocity wasn't there, and nothing was really very sharp."
McHugh got little support from his offense, just Jason Castro's homer in the second inning.
"We need to start to string some stuff together," Castro said. "That's really the biggest thing — getting guys on and being aggressive on the base paths."
Heston (3-3), a rookie right-hander who retired the last 22 batters, has allowed two runs or fewer in five of his seven starts this season.
"Their pitcher breezed through the game," Houston manager A.J. Hinch said. "Just wasn't a very good night for us. We weren't very disciplined. That's the disappointing part. We just had no action. He pitched, and we really didn't counter with a ton of back-to-back quality plate appearances."
Duffy, had a 3-run double in the second inning and added a 2-run single as part of a 5-run fifth. Angel Pagan had three hits for San Francisco, which had a season-high with the eight runs.
The Giants made it 5-1 after loading the bases in the fifth. After Brandon Belt struck out for the second out, Jason Maxwell had an infield single to shortstop Marwin Gonzalez, whose throw to second was errant, allowing Joe Panik and Pagan to score.
Brandon Crawford followed Maxwell with an RBI double to center before Duffy's single made it 8-1.
Giants: OF Hunter Pence (left forearm) continued an injury rehab assignment Tuesday at Triple-A Sacramento. Pence is 1 for 8 with an RBI and two runs scored in three games.
Astros: OF George Springer began an injury rehab assignment Tuesday for Double-A Corpus Christi against San Antonio. Springer is on the 7-day concussion DL backdated to May 6. Springer will be activated from the DL on Wednesday, and OF Robbie Grossman will be optioned to Fresno. ... RHP Luke Gregerson was activated from the Family Medical Emergency List Tuesday.
Giants: RHP Tim Hudson (1-3) is looking to rebound after allowing six runs and a career-high 15 hits over 6 1-3 innings in a 7-2 loss to Miami on Thursday. Hudson is 5-0 with a 1.24 ERA in seven career starts against the Astros.
Astros: LHP Brett Oberholtzer will come off the DL and make his first start of the season in the finale of the two-game series. Oberholtzer, who has been on the DL with a left index finger blister suffered at the end of spring training, was 1-1 with 11 strikeouts and allowed seven runs in two rehab assignments with Triple-A Fresno.
STREAKING AND SLUMPING
Duffy extended his hitting streak to six games with the three hits. During his hitting streak, Duffy is 10 for 20. ... Houston's offense has hit the skids. Gonzalez is 0 for his last 16; Evan Gattis is 0 for his last 17; and Jose Altuve, who led the majors in hits last season, is 0 for his last 10.