Compounds of the formula I: or a pharmaceutically acceptable salt thereof, wherein, R1 is optionally substituted thiadiazolyl, and R2, R3, R4, R5, R6, R7 and R8 are as defined herein. Also disclosed are methods of using the compounds for treating diseases associated with P2X3 and/or a P2X2/3 receptor antagonists and methods of making the compounds.