pipedream icon indicating copy to clipboard operation
pipedream copied to clipboard

[BUG] Failed to create source Github: New Card in Column for a specific Github Project

Open vunguyenhung opened this issue 3 years ago • 1 comments

Describe the bug On Pipedream @pd-component-dev org, I have created a new workflow and attempted to create a source Github: New Card in Column for Pipedream Github Project: Component (Source and Action) Backlog, but there's an error when I tried to save the Source

To Reproduce Steps to reproduce the behavior:

  1. Login into Pipedream's @pd-component-dev org
  2. Create a new Workflow
  3. Add the trigger Github: New Card in Column with the information in the image below
  4. Observe the error: HttpError: Not Found Screen Shot 2022-07-21 at 13 23 28

Expected behavior The source Github: New Card in Column should be created successfully, and is triggered when a card created or moved into the column

Additional context I successfully created the source Github: New Card in Column on my personal account, with personal Github Project. So I suspect this issue occurred specifically for Pipedream Github Project image

vunguyenhung avatar Jul 21 '22 06:07 vunguyenhung

Can confirm I had the same issue

andrewjschuang avatar Jul 26 '22 12:07 andrewjschuang

I'll try to fix this bug

alysonturing avatar Aug 03 '22 13:08 alysonturing

@andrewjschuang @vunguyenhung I also successfully created the source Github: New Card in Column on my personal account, with personal Github Project. But with further investigation, I became aware that the webhook endpoint answers: 404 Resource not found when you don't have enough administrative permissions.

  • So I'd say it's not a bug, we simply doesn't have permissions to create webhooks into pipedream's organization https://docs.github.com/en/rest/webhooks/repos#create-a-repository-webhook https://github.com/orgs/community/discussions/26368

alysonturing avatar Aug 08 '22 15:08 alysonturing

@andrewjschuang @vunguyenhung with the previous informations, how we can proceed with this task, should I close it?

alysonturing avatar Aug 08 '22 15:08 alysonturing

Hello @alysonturing, thank you for checking! I think we can improve our error message to inform the user that their connected Github account might not have enough permissions. For example, the error message can be:

HttpError: Not found. 
This might due to your connected Github account does not have enough permission to perform this action.

@alysonturing @andrewjschuang what do you think?

vunguyenhung avatar Aug 08 '22 15:08 vunguyenhung

Hello @alysonturing, thank you for checking! I think we can improve our error message to inform the user that their connected Github account might not have enough permissions. For example, the error message can be:

HttpError: Not found. 
This might due to your connected Github account does not have enough permission to perform this action.

@alysonturing @andrewjschuang what do you think?

I agree with that

alysonturing avatar Aug 08 '22 15:08 alysonturing

It's strange because Danny gave the pd-component-dev org account the required permissions, but it still can't create the webhook for the project. I've added you to the org, can you please check on that?

andrewjschuang avatar Aug 08 '22 16:08 andrewjschuang

It's strange because Danny gave the pd-component-dev org account the required permissions, but it still can't create the webhook for the project. I've added you to the org, can you please check on that?

@andrewjschuang I tried again with my account, I'm part of the pipedream's organisation, still doesn't work... Can you check my permissions to create webhooks?

alysonturing avatar Aug 08 '22 16:08 alysonturing

FYI the source Custom Webhook Events has the same issue, I can't use pd-component-dev to create webhooks on Pipedream's Github organization. image

alysonturing avatar Aug 08 '22 19:08 alysonturing

From this link:

Tip: Only members with owner privileges for an organization or admin privileges for a repository can manage webhooks for an organization. For more information, see "Roles in an organization."

I have tested this, and for organization repositories, the token must have admin privileges (maintainer is not enough) and at least public_repo and read:org scopes to create webhooks, along with others required by the trigger.

Closing this since the underlying issue and fix is described above.

andrewjschuang avatar Aug 19 '22 14:08 andrewjschuang