Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unknown X-Github-Event in message: schedule #3384

Open
gerhard opened this issue Dec 12, 2024 · 5 comments
Open

unknown X-Github-Event in message: schedule #3384

gerhard opened this issue Dec 12, 2024 · 5 comments

Comments

@gerhard
Copy link

gerhard commented Dec 12, 2024

I am trying to confirm whether we understood this issue correctly.

We are using github.com/google/go-github/v59 v59.0.0 in Dagger v0.15.0 and hitting the following error: unknown X-Github-Event in message: schedule in the context of https://github.com/dagger/dagger/actions/runs/12293242833/job/34319415252

Image

@jacobwgillespie tracked this issue down to:

var (
// eventTypeMapping maps webhooks types to their corresponding go-github struct types.
eventTypeMapping = map[string]interface{}{

In Dagger, we are calling this from::

	event, err := github.ParseWebHook(eventType, payload)
	if err != nil {
		slog.Warn("failed to parse $GITHUB_EVENT_PATH", "err", err)
		return labels
	}

My understanding is that ScheduleEvent is missing in eventTypeMapping.

Did we understand this issue correctly?

Follow-up question: are you open to a PR?


cc @vito @jedevc @sipsma @grouville @aluzzardi

@gmlewis
Copy link
Collaborator

gmlewis commented Dec 12, 2024

Follow-up question: are you open to a PR?

I'll take the super-easy question first. 😂

Yes, contributions are always welcome.
Please see CONTRIBUTING.md for details.

@gerhard
Copy link
Author

gerhard commented Dec 12, 2024

Sure thing!

Happy to help get this fixed if we can confirm this is indeed a bug & not user error.

@gmlewis
Copy link
Collaborator

gmlewis commented Dec 12, 2024

Did we understand this issue correctly?

And now for the more difficult question 😅 ...

Yes, it looks like your interpretation is correct.

Happy to help get this fixed if we can confirm this is indeed a bug & not user error.

Wonderful! I would prefer to call this "missing functionality in need of enhancement" as keeping up with the GitHub v3 API has (obviously) been a very long and ongoing process, judging simply from the commit history of this repo. 😂

@gerhard
Copy link
Author

gerhard commented Dec 12, 2024

Thank you for confirming @gmlewis.

Looking at a fix now.

@gmlewis
Copy link
Collaborator

gmlewis commented Dec 12, 2024

By the way, version v59 is many breaking changes ago, and I know the event-handling code has changed a fair amount since then. Please let me know if you have questions about the breaking changes. You should be able to find a concise summary of every breaking change in each version's release notes (under "Releases").

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants