How to relaunch GitHub check without pushing new commits?

Viewed 34068

I'm currently using GitHub with a basic Jenkins integration (with the GitHub plugin): each time I push something, my Jenkins tests are triggered and the status is reported to GitHub.

For some dirty reasons (and I know the root cause is here), my tests could randomly fail and then report a failed status to GitHub (which blocked the possibility to merge the PR: and that's the expected behavior).

Do you know if it's possible to relaunch the tests without pushing a new commit? Because I know if I relaunch the tests, they will pass.

6 Answers

Update: you can also push an empty commit to your branch to re-trigger status checks: git commit -m "retrigger checks" --allow-empty and then git push <branchname>

You can do this by closing and then re-opening the Pull Request. This will cause all status checks to run again on the same commit.

Doing git commit --amend and force pushing makes github retrigger all checks. Not perfect but better than closing then reopening the PR.

There's now a button in the Github UI to rerun checks. Not sure if it works for Jenkins, but it worked for my situation.

enter image description here

If you open a PR that failed, under Checks tab you will see the list of all checks that were performed on your PR. Next to the failed ones, there will be a clickable text that says "Re-run"

enter image description here

Depending on how you have integrated Github with Jenkins and what plugin you have have used, the method might vary. But usually you have support for "magic"-sentences that will retrigger Jenkins if added as a comment on Github.

For example commenting "test this please" or "retest this please" in Github might retrigger Jenkins.

Seems like closing and re-opening the PR could be an option.

Related