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

The action passes when some exception is thrown #6

Open
IagoLast opened this issue Oct 10, 2022 · 6 comments
Open

The action passes when some exception is thrown #6

IagoLast opened this issue Oct 10, 2022 · 6 comments

Comments

@IagoLast
Copy link

Describe the bug

We are trying to setup the action in the bcnJs events repo. We followed the install instructions and when the "Enable GitEvents" commit is merged the action is triggered and reports a succesfull build.

However if you see the checks it actually failed:

https://github.com/BarcelonaJS/events/actions/runs/3219888241/jobs/5265864216

Expected behavior

The action should be reported as failed.
It would be nice to provide any hints on what went wrong: "Invalid app ID" "invalid token..."

Additional context
Thx for this project 🙏

@PatrickHeneise
Copy link
Member

Thanks for reporting this @IagoLast !

I hacked the "init repo" action together once for a QuickStart, there's definitely a lot of room for improvements, sorry for the trouble.

After labels the action tries to create Organizers and Co-Organizer Teams, did you set the "Members" permission in the Organization section?

@PatrickHeneise
Copy link
Member

as far as I can recall, the action does (in order):

  1. reset labels
  2. create 2 teams
  3. create issue templates

The important bit are the labels, so if they're set up, you may just want to copy and change the default templates for events, etc.

@PatrickHeneise
Copy link
Member

Check out https://github.com/cyprus-developer-community/events for a working example :)

@PatrickHeneise
Copy link
Member

I'm struggling a bit with the setup. Any suggestion how to trigger the individual processes to set up a repository, making sure all the files and labels are set correctly? /cc @steffen

@steffen
Copy link

steffen commented Oct 12, 2022

The action should be reported as failed.

The workflow uses Node.js v12 where you need to set explicitly (via --unhandled-rejections=strict in CLI) to fail the process with a non-zero exit code if there are unhandled promise rejections, see warning:

(node:1656) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:1656) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

I think this behavior changed in Node.js v16 or so, hence worth trying to change the Node.js version to check if it fails properly.

I'm struggling a bit with the setup. Any suggestion how to trigger the individual processes to set up a repository, making sure all the files and labels are set correctly? /cc @steffen

👋 @PatrickHeneise What do you mean?

@PatrickHeneise
Copy link
Member

Thanks, wasn't aware of the change in Node. But I'm wondering if the UX/DX of this is OK or if there's a better way

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

No branches or pull requests

3 participants