The ghRepository is being cached when a successful connection is established, but if the connection credentials are ever updated during normal Jenkins operation(in our case, regular credential rotation procedures) the repo object is still reused and never invalidated until Jenkins is rebooted.
It would be nice to have a way to invalidate ghRepository when operating with it if an error is arisen from the underlying client and support updating Jenkins credentials without disrupting operation.
https://github.com/jenkinsci/ghprb-plugin/blob/ebd6df7b593865c65ae87ef78a0d8255cc90fada/src/main/java/org/jenkinsci/plugins/ghprb/GhprbRepository.java#L63
The
ghRepository
is being cached when a successful connection is established, but if the connection credentials are ever updated during normal Jenkins operation(in our case, regular credential rotation procedures) the repo object is still reused and never invalidated until Jenkins is rebooted.It would be nice to have a way to invalidate
ghRepository
when operating with it if an error is arisen from the underlying client and support updating Jenkins credentials without disrupting operation.