Add ways to get only closed pulls, and only external pulls

I'm having trouble parsing/playing with this code becuase I don't understand what `intext` is supposed to represent throughout the code. Clarification?