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

This action is available in the Github context, but it's the octkit context, not the Github Actions context, and I can't find any explanation for it anywhere. #347

Closed
mecaota opened this issue Oct 18, 2024 · 2 comments · Fixed by #348
Labels
bug Something isn't working documentation Improvements or additions to documentation
Milestone

Comments

@mecaota
Copy link

mecaota commented Oct 18, 2024

const context = { github: github.context, env: process.env };

In this Actions, it is stated that the github context is available and that if payload json file is prepared, it will be parsed, but this is not the github context of Github Actions, but the context provided by octokit. This is misleading due to insufficient explanation in the current documentation. Please state in the documentation that it is the octokit context.

Even if you write it according to the context described in the Github Actions documentation, it will be parsed as "???" because the octokit github context is different from the camel case and snake case, and the context itself provided is different.

I spent an hour trying to solve this. The documentation is very unhelpful.

@zimeg zimeg added bug Something isn't working documentation Improvements or additions to documentation labels Oct 18, 2024
@zimeg zimeg added this to the 1.x milestone Oct 18, 2024
@zimeg
Copy link
Member

zimeg commented Oct 18, 2024

Hey @mecaota 👋 Thank you so much for reporting this!

These variables have caused a lot of confusion before, some of it in #226, and I appreciate you pointing to a cause for some missing variables 🙏

The octokit context you shared is what I'm finding in the actual action, and wrapped within the payload is details for the webhook event.

I'm sorry about the added confusion this caused - I'm thinking the similar context naming has been confusing before. We'll update this documentation soon 📚

@zimeg
Copy link
Member

zimeg commented Oct 18, 2024

The README now references the different possibilities of these payloads 🚀

I think we can improve this with examples in follow up changes, but right now these are better details on payloads share IMO. Thank you again for sharing these links!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation
Projects
None yet
2 participants