Github webhook for codepileline not triggering when there is a commit in git repo

1.3k views Asked by At

I have set up an aws code pipeline where Git is used for the repository and have chosen GitHub webhooks as change detection mode.

the pipeline works great when I manually trigger the pipeline by clicking on the Release change button.

But when I try a commit and then push into my mater there is no activity in the pipeline. I am not sure if the git webhook is working correctly or is there any additional configuration that I am missing.

I am just a user of the git repository which is on git hub.

Could anyone suggest what is that I am missing?

edit :

enter image description here

Have added the token and also repo and admin:repo as you can see it showed it has been used

This is my git repo :

enter image description here

as you can see there a commit a few minutes back.

This is pipeline's source :

enter image description here

As you can see there are no actions by it from past 18th min which was triggering it manually

when you click the GitHub link that source it points to the repo and the same branch and also has the latest commit info (shared in the pic of git repo)

EDIT: here is the thing I get which seems to be good. [![enter image description here][4]][4]

But I could also see there is no webhook created on the git hub repo, Should I put it manually?

1

There are 1 answers

0
Chris Williams On BEST ANSWER

This likely comes down to one of the below scenarios.

The first scenario is that the permissions are not correctly configured within your GitHub account. Looking at the documentation the below permission must be attached to the generated token:

  • repo
  • admin:repo_hook

The second scenario is that the branch itself is not have changes deployed to it, its very important that the branch specified is the one receiving the changes. If this branch does not have any changes then the pipeline will not trigger until there are changes.