Cochran's Q test is a nonparametric analog to the repeated measures ANOVA when the outcome is dichotomous/binary.

Cochran's Q is an omnibus test for stochastic dominance in $b$ blocks (e.g. individuals) across $k$ groups with nominal outcome data (specifically outcomes coded 0/1); it effectively generalizes McNemar's test to two or more groups. The null hypothesis is that the probability of success in each of $k$ groups is the same.

Post hoc pairwise comparisons may be carried out using either Cochran's Q test for each pair, or with McNemar's test. Adjustments for multiple comparisons, using either family-wise error rate, or false discovery rate methods are then appropriate.