Usually it is totally fine to reveal where you lean on the political spectrum, unless your employer has a specific policy against it.
While covering a Trump rally in Rochester, MN, now former reporter James Bunner donned a “Make America Great Again” cap. Bunner was promptly fired for showing his partisanship.
Noel Sederstrom, KTTC-TV news director, said, “He violated our policy so he’s no longer with us. We don’t allow our people to wear campaign clothing while on assignment.”
Source: https://people.com/politics/james-bunner-fired-kttc-make-america-great-again-hat/