Skip to content
This repository has been archived by the owner on Sep 19, 2024. It is now read-only.

Detect PR & Auto Assign Issue #260

Open
0x4007 opened this issue Apr 12, 2023 · 25 comments · Fixed by #273
Open

Detect PR & Auto Assign Issue #260

0x4007 opened this issue Apr 12, 2023 · 25 comments · Fixed by #273

Comments

@0x4007
Copy link
Member

0x4007 commented Apr 12, 2023

It would be nice if the bot can detect open pull requests to unassigned issues and automatically assign the pull request author.

Make sure that it only works for the first pull request opened and it's actively being worked on. In case two bounty hunters try to compete with each other on the bounty without first assigning themselves: the first to open should get the assignment.

https://t.me/UbiquityDevPool/2506

@seprintour
Copy link
Contributor

seprintour commented Apr 26, 2023

/start

@ubiquibot
Copy link

ubiquibot bot commented Apr 26, 2023

@seprintour The time limit for this bounty is on Thu, 27 Apr 2023 13:39:05 GMT

Your currently set address is:
0x3623338046b101ecEc741De9C3594CC2176f39E5
please use /wallet 0x4FDE...BA18 if you want to update it.

@seprintour
Copy link
Contributor

Unfortunately, pull requests linked to an issue by comments does not show up on the pull request and issues endpoint

@seprintour
Copy link
Contributor

However, i found it shows up on the timeline here as a cross-reference

Either this or scraping pull requests to look for open pull requests on the Development tab should work

@seprintour
Copy link
Contributor

If anyone has a solution to show issues on a pull request or vice versa, it would appreciated.

As the current implementation i have would require :- Fetching all PRs, Fetching all open issues, Checking timelines of open requests and if there is the pull request on the timeline exists, is open and no one is assigned

Owner of pull request is assigned

@Steveantor
Copy link
Contributor

If anyone has a solution to show issues on a pull request or vice versa, it would appreciated.

As the current implementation i have would require :- Fetching all PRs, Fetching all open issues, Checking timelines of open requests and if there is the pull request on the timeline exists, is open and no one is assigned

Owner of pull request is assigned

You shouldn't assign yourself without fully understanding the issue or possible implementation first.

@seprintour
Copy link
Contributor

If anyone has a solution to show issues on a pull request or vice versa, it would appreciated.
As the current implementation i have would require :- Fetching all PRs, Fetching all open issues, Checking timelines of open requests and if there is the pull request on the timeline exists, is open and no one is assigned
Owner of pull request is assigned

You shouldn't assign yourself without fully understanding the issue or possible implementation first.

I understood it and it is in progress.. just need to confirm, you can see i have possible implementations above lol

Just need to know what would work best

@seprintour
Copy link
Contributor

seprintour commented Apr 27, 2023

So i have 3 possible :- scraping, using timelines or pull requests body.. I initially thought GitHub API will add the issue on the pull request linked through the body.

But they don't, that's why i'm here

@Steveantor
Copy link
Contributor

Steveantor commented Apr 27, 2023

So i have 3 possible :- scraping, using timelines or pull requests body.. I initially thought GitHub API will add the issue on the pull request linked through the body.

But they don't, that's why i'm here

imo, scraping is the way to go since GitHub doesn't provide any API.
you should parse linked element (like below) instead of Resolves ##
image

modify the src/helpers/parser.ts as needed.

@seprintour
Copy link
Contributor

seprintour commented Apr 27, 2023

However, i found it shows up on the timeline here as a cross-reference

Either this or scraping pull requests to look for open pull requests on the Development tab should work

Thanks for the file parser.ts, works exactly as i planned here.. would have to look at the Development tab for mine

@seprintour
Copy link
Contributor

@Steveantor scraping was a breeze.. i have finalised the PR and its ready to review

Thanks for your help again

@ubiquibot
Copy link

ubiquibot bot commented Apr 30, 2023

[ CLAIM 100 DAI ]

0x3623338...176f39E5

@ubiquibot
Copy link

ubiquibot bot commented Sep 11, 2023

@seprintour please be sure to review this conversation and implement any necessary fixes. Unless this is closed as completed, its payment of 100.0 DAI will be deducted from your next bounty.

@ubiquibot
Copy link

ubiquibot bot commented Sep 11, 2023

@seprintour - Releasing the bounty back to dev pool because the allocated duration already ended!
Last activity time: Thu Apr 27 2023 09:41:53 GMT+0000 (Coordinated Universal Time)

@0x4007
Copy link
Member Author

0x4007 commented Sep 11, 2023

This isn't working anymore. #746

Perhaps a core team member should take this over.

rfc @ubiquity/software-development

@wannacfuture can you investigate this


Here is the diff from the latest commit on this pull request to the current development HEAD: https://github.com/ubiquity/ubiquibot/compare/2399857f507467fa9f9672855580c68c457bee97..development#diff-41f183deca0c54367420ce6e3bf0764513ba00c2ce136bb19056c616c2c06a59

Useful to compare against the changed files for this feature https://github.com/ubiquity/ubiquibot/pull/273/files

@seprintour
Copy link
Contributor

This isn't working anymore.

Perhaps we'd need tests here, so one doesn't work on one feature and break another.

Every feature in the bot would be tested

@wannacfuture
Copy link
Contributor

This isn't working anymore. #746

Perhaps a core team member should take this over.

rfc @ubiquity/software-development

@wannacfuture can you investigate this

Here is the diff from the latest commit on this pull request to the current development HEAD: https://github.com/ubiquity/ubiquibot/compare/2399857f507467fa9f9672855580c68c457bee97..development#diff-41f183deca0c54367420ce6e3bf0764513ba00c2ce136bb19056c616c2c06a59

Useful to compare against the changed files for this feature https://github.com/ubiquity/ubiquibot/pull/273/files

Let me take a look at this.

@seprintour
Copy link
Contributor

@pavlovcik i noticed this is a penalty.. It's been a long time since I worked on this issue

@0x4007
Copy link
Member Author

0x4007 commented Sep 12, 2023

@pavlovcik i noticed this is a penalty.. It's been a long time since I worked on this issue

Let's see if the penalty feature even works...I've never seen it work in production before. If it does, I'll make up for the difference. Just let me know the results please!

This was referenced Sep 12, 2023
@seprintour
Copy link
Contributor

@pavlovcik i noticed this is a penalty.. It's been a long time since I worked on this issue

Just let me know the results please!

Okay, I'd do that. Perhaps my next permit would contain the penalty info

@0x4007
Copy link
Member Author

0x4007 commented Sep 12, 2023

As a heads up: if it renders a permit with a penalty don't claim it. I'll manually revoke the permit, remove the penalty, and regenerate the new permit instead.

@wannacfuture
Copy link
Contributor

Just want to make it clear.

So, @pavlovcik We'll ignore all the assign rules for the linked first pull request for the issue, right?
'll assign that pr's author to the issue even he reached max limit or so.

@Steveantor
Copy link
Contributor

Just want to make it clear.

So, @pavlovcik We'll ignore all the assign rules for the linked first pull request for the issue, right? 'll assign that pr's author to the issue even he reached max limit or so.

Not ignoring will render the PR author's contribution useless, and other users will simply copy-paste his code
and take the reward

@0x4007
Copy link
Member Author

0x4007 commented Sep 12, 2023

Just want to make it clear.

So, @pavlovcik We'll ignore all the assign rules for the linked first pull request for the issue, right? 'll assign that pr's author to the issue even he reached max limit or so.

I designed the rules for reasons. Always follow the rules.

@wannacfuture
Copy link
Contributor

I took a look on it.

necessary functions are ready on #657

'll finish this right after it is merged.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
No open projects
Status: Passed
Development

Successfully merging a pull request may close this issue.

4 participants