Github PR create/update hooks triggering a seperate integration test job

Hi,

Is it possible to trigger a specific build/job on circle ci, if a pull request is created or updated on github?

I aim to run integration tests only when a PR is created or udpated. But am not sure how this would be possible in circlci. I know github sends a payload, but i cannot get access to the data in circleci, i would need in the payload to determine what type of action/event took place.

I recently solved this by way of another post somewhere here (or maybe it was stackoverflow) by using branch filters.

Job only runs from forked repository

workflows:
  myWorkflow:
    jobs:
      - myJob:
        filters:
          branches:
            only: /^pull\/.*$/ 

Job only runs from canonical repository

workflows:
  myWorkflow:
    jobs:
      - myJob:
        filters:
          branches:
            only: /^(?!pull\/).*$/ 

This has been working for me so far.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.