0

I’m currently working on a CI/CD setup during my internship, and I want to trigger a Jenkins build automatically whenever a Pull Request (PR) is created on a GitHub repository.

Here’s my context:

  • I’m using Jenkins running locally (localhost).
  • Jenkins just calls an external script to compile the project.
  • I already tested calling the GitHub REST API, and it works fine — but this involves using an external script to fetch PRs.
  • I don’t have admin access to the GitHub repo, so I can’t create or configure GitHub webhooks.
  • I also don’t want to expose Jenkins over the internet using tools like ngrok, serveo, or similar.
  • I’d also prefer to avoid polling (e.g. using a cron or Git plugin with a schedule).

I’ve found that some Jenkins plugins can detect GitHub PRs, but many of them have reported security vulnerabilities, which makes them unsuitable in my case.

Is there a reliable way to detect GitHub Pull Requests and trigger a Jenkins build locally?

2
  • The third option you have mentioned is the best with your restrictions in place. Any reason why an external script would be a problem? There are no other reasonable options apart from the ones you mentioed. Commented Apr 14 at 8:16
  • @MB how is it different from polling (except that polling would be performed by an external script that complicates the setup)? Commented Apr 20 at 15:55

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.