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

PR creation comment CI job fails if a pull request is made from a fork #5115

Closed
Chriscbr opened this issue Dec 4, 2023 · 3 comments · Fixed by #5820
Closed

PR creation comment CI job fails if a pull request is made from a fork #5115

Chriscbr opened this issue Dec 4, 2023 · 3 comments · Fixed by #5820
Labels
🐛 bug Something isn't working 👷‍♀️ contributor-experience Improvements for contributors' experience

Comments

@Chriscbr
Copy link
Contributor

Chriscbr commented Dec 4, 2023

I tried this:

Making a pull request from a fork (#5114)

This happened:

One of the jobs failed with "Error: Parameter token or opts.auth is required"

https://github.com/winglang/wing/actions/runs/7080462897/job/19270345934?pr=5114

I expected this:

No error (the comment should be posted, or the job should be skipped)

Is there a workaround?

No response

Anything else?

No response

Wing Version

No response

Node.js Version

No response

Platform(s)

No response

Community Notes

  • Please vote by adding a 👍 reaction to the issue to help us prioritize.
  • If you are interested to work on this issue, please leave a comment.
@Chriscbr Chriscbr added 🐛 bug Something isn't working 👷‍♀️ contributor-experience Improvements for contributors' experience labels Dec 4, 2023
@staycoolcall911 staycoolcall911 self-assigned this Dec 4, 2023
@staycoolcall911
Copy link
Contributor

Was chatting with @MarkMcCulloh about this yesterday.

  • Impact: this doesn't seem to fail any build, so it's just that the new PR comment is not created on fork PRs. This is probably a low priority.
  • Cause: fork PRs don't have permission to run an action on "PR opened" (security reasons).
  • How to fix: need to add this action into our build workflow (trigger for build), but this will require us to add extra logic to check whether this comment was already added on every build run and only add this comment if it doesn't already exist (so it should only happen on first build run).

Copy link

github-actions bot commented Feb 4, 2024

Hi,

This issue hasn't seen activity in 60 days. Therefore, we are marking this issue as stale for now. It will be closed after 7 days.
Feel free to re-open this issue when there's an update or relevant information to be added.
Thanks!

@github-actions github-actions bot added the Stale label Feb 4, 2024
@mergify mergify bot closed this as completed in #5820 Feb 29, 2024
mergify bot pushed a commit that referenced this issue Feb 29, 2024
…5820)

Fixes #5115

The mutation workflow is using the wrong `head` for forks when the repo name is `wing` (which it usually is). This worked before, I suspect the API changed, but in any case this fixes things.

Also updated the initial PR comment workflow to work on forks.

Tested in https://github.com/MarkMcCulloh/wing-distributed-workflow

*By submitting this pull request, I confirm that my contribution is made under the terms of the [Wing Cloud Contribution License](https://github.com/winglang/wing/blob/main/CONTRIBUTION_LICENSE.md)*.
@monadabot
Copy link
Contributor

Congrats! 🚀 This was released in Wing 0.59.24.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working 👷‍♀️ contributor-experience Improvements for contributors' experience
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants