The 40-19 success at Headingley ended the South Yorkshire club’s five-game losing streak.
Doncaster had been in danger of becoming embroiled in a relegation fight with their derby rivals but have moved up to ninth.
Centre Foley said: “It has been a while coming and the main thing was getting the five points. However scrappy it was at times, it’s the win we’re walking away with and that’s the main thing.
“We’ve got a few weeks now until our next game so it was definitely important to take a win into this off week so that when we come back in the new year we can really come in firing.”
Scrum-half Tom James got them up and running with an early brace and 28-year-old Foley conceded: “TJ always seems to be in the right place at the right time.
“We started really well, played in the shape we wanted to, produced some good rugby and scored some good tries.
“We kind of went away from that a little in the second half; we took our foot off the gas a little bit and ultimately we let them back into the game.”
Now in his third campaign since joining from Rotherham, he looks to have nailed down a regular spot. “This season especially has been nice to play a run of games in one position,” said Foley, who can also play full-back, fly-half and wing.
“I’m really enjoying playing at 12 and feel like I’m playing some of my best rugby in a Donny shirt at the minute.
“We’re off to Newcastle away in our next game which, as everyone knows, is probably one of the toughest fixtures of the season.
“But we’ve got three games after that against guys all around us – Nottingham, which is a bit of a derby at our place, then London Scottish and Ampthill.”