ubiquity / devpool-directory-bounties

Open bounties for the devpool-directory repository
1 stars 4 forks source link

Bug: Unlabeled Issues Fetched" #30

Closed jordan-ae closed 3 weeks ago

jordan-ae commented 1 month ago

@0x4007 I think this issue stemming from changes made on the backend, but the wrong issues are being populated on the frontend.

Screenshot from 2024-08-15 14-15-50

0x4007 commented 1 month ago

image

Yeah this is all messed up now. The new changes need to be fixed.

ubiquibot[bot] commented 1 month ago
! action has an uncaught error
0x4007 commented 1 month ago

image

Pretty sure it's because xno-miner ran their bot and it didn't populate the labels.

We need to ignore opened issues from anybody but our bot.

Ideally we should not allow unauthorized issues to be opened at all, but in case they are, we should also handle this on our front end.

jordan-ae commented 1 month ago

If we check if (projectIssue.user?.login !== "ubiquibot") return; when creating new issues it should avoid such. We could also have a similar check to load issues on the frontend only if the owner is ubiquibot. Think this should work.

jordan-ae commented 1 month ago

/start

ubiquityos[bot] commented 1 month ago
DeadlineFri, Aug 16, 4:20 AM UTC
Registered Wallet 0x2F05fD58023B0a95d1866aa0A3b672cEf05945c5
Tips:
<ul>
<li>Use <code>/wallet 0x0000...0000</code> if you want to update your registered payment wallet address.</li>
<li>Be sure to open a draft pull request as soon as possible to communicate updates on your progress.</li>
<li>Be sure to provide timely updates to us when requested, or you will be automatically unassigned from the task.</li>
<ul>
ubiquibot[bot] commented 1 month ago

DeadlineFri, Aug 16, 4:20 AM UTC
Registered Wallet 0x2F05fD58023B0a95d1866aa0A3b672cEf05945c5
Tips:
0x4007 commented 1 month ago

If we check if (projectIssue.user?.login !== "ubiquibot") return; when creating new issues it should avoid such. We could also have a similar check to load issues on the frontend only if the owner is ubiquibot. Think this should work.

  1. We should delete (not close) the issues created by unauthorized entities. This removes pollution of the devpool-directory issues
  2. Dynamically check if our organizations, based on organization ID, own the bot attempting to open the issue. Then consider them authorized. That way when we create new bots, as we do, we don't have to keep updating this code.

76412717@ubiquity 133917611@ubiquibot 165700353@ubiquityos

jordan-ae commented 1 month ago

Sound Great, the only little blocker is that its not possible to delete an issue directly with the octokit API. The only option is to close the issue

Keyrxng commented 1 month ago

Seems like you need admin permissions and it has to be enabled at the org level for this to be possible via the UI too

https://docs.github.com/en/organizations/managing-organization-settings/allowing-people-to-delete-issues-in-your-organization

It's likely possible via GitHub CLI script example here which if it is still possible we could write a script and run it in the workflow with an admin auth token as a repo secret

I guess they make it hard because it could be dangerous to programmatically delete lots of issues so if this is the route we need to take it should be safeguarded to ensure we don't pop legit issues.

rndquu commented 1 month ago

There's no bug with "Unlabeled issues" since they were simply created by the xno-miner's app testbot6 used for testing purposes. This issue could be closed in favor of https://github.com/ubiquity/devpool-directory-bounties/issues/31.

rndquu commented 1 month ago

@jordan-ae As a part of this issue you're going to delete github issues created not by the bot (as described here), right? If so then I'll close https://github.com/ubiquity/devpool-directory-bounties/issues/31 as "not planned".

ubiquity-os[bot] commented 3 weeks ago
# Issue was not closed as completed. Skipping.