Skip to content

Github poller does not work as expected #6799

Description

@jianliang00

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions