cds icon indicating copy to clipboard operation
cds copied to clipboard

Github poller does not work as expected

Open jianliang00 opened this issue 1 year ago • 0 comments

I'm trying to use the git repository poller in my own CDS services to get events from Github. After the services get running correctly, I make some changes in my repository on Github, but I can't find any events triggering my workflows. Here's part of my workflow configuration and I'm sure the vcs service can access my repository:

hooks:
  test1:
  - type: Git Repository Poller
    config:
      payload: '{}'

I tried to debug the source code and found that the key problem is the following line: image The function mapstructure.Decode did not decode the event payload correctly. Instead, it leaves all the fields of MergeRequest struct empty.

image Here's the value of variable i. Notice that the field state of merge_request has the value open image

And Here's the value of variable e. The field State of MergeRequest along with other fields are all empty image

I believe there shouldn't be such a blatant bug in Mapstructure, yet I'm perplexed as to why such a situation arises.

Can anyone give me some help?

jianliang00 avatar Jan 19 '24 05:01 jianliang00