Rovers have played the fewest games of the current top eight and are six points behind league leaders Lincoln City with two games in hand.
It took just five minutes for Darren Moore's side to take the lead, one they wouldn't relinquish, as they edged past struggling Swindon.
Fejiri Okenabirhi was played through on goal and made no mistake with a tidy finish past Mark Travers in the hosts' goal.
Matt Smith came close to an equaliser on 39 minutes but curled the ball wide in what was one of Swindon's best chance of the opening 45 minutes.
Doncaster punished that miss in first-half stoppage time when Okenabirhi nodded home for his second after Andy Butler had kept alive Jason Lokilo's chipped ball to the back post.
Rovers enjoyed less of the ball with the home side stringing together more passes and enjoying the majority of possession.
Their dominance of the ball reaped rewards as they pulled a goal back through Hallam Hope, who diverted the ball past Ellery Balcombe.
Six minutes of added time gave Rovers fans watching at home some unwanted nerves but Moore's side saw out the contest to make it six victories from their last seven games.
Support The Yorkshire Post and become a subscriber today. Your subscription will help us to continue to bring quality news to the people of Yorkshire. In return, you'll see fewer ads on site, get free access to our app and receive exclusive members-only offers. Click HERE to subscribe.