ubiquity / ubiquibot

Putting the 'A' in 'DAO'
https://github.com/marketplace/ubiquibot
MIT License
17 stars 59 forks source link

feat: follow up with reviewer #783

Closed EtherealGlow closed 10 months ago

EtherealGlow commented 11 months ago

Resolves #324

Quality Assurance:

netlify[bot] commented 11 months ago

Deploy Preview for ubiquibot-staging ready!

Name Link
Latest commit 4d09c74587c9a1fe097295b7ebdf8ca422b32fad
Latest deploy log https://app.netlify.com/sites/ubiquibot-staging/deploys/6533b687a585a100083f9cc8
Deploy Preview https://deploy-preview-783--ubiquibot-staging.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

EtherealGlow commented 11 months ago

same logic as this https://github.com/ubiquity/ubiquibot/pull/708

EtherealGlow commented 11 months ago

just it follows up with the reviewer/reviewers now instead of doing nothing

EtherealGlow commented 11 months ago

doesnt this execute whenever the bot tries to follow up with reviewer? it only gets the reviewer which have pending reviews it doesnt get the reviewers who have already reviewed

0x4007 commented 11 months ago

QA should always be posted thats why its part of the pull request template.

EtherealGlow commented 11 months ago

how would i even qa this?

0x4007 commented 11 months ago

Just post proof that it works on your fork

0xcodercrane commented 11 months ago

how would i even qa this?

Please refer to the README.md

EtherealGlow commented 11 months ago

qa idk why the bot requested the review twice

EtherealGlow commented 11 months ago

Now that I see it's prob because it's followed up a second time, as it was like 30s to follow up and 5mins to disqualify

wannacfuture commented 11 months ago

Please read this again. @EtherealGlow

https://github.com/ubiquity/ubiquibot/pull/783#pullrequestreview-1635004710

EtherealGlow commented 10 months ago

@wannacfuture is there something in github api which provides the timestamps for the requested reviewers

wannacfuture commented 10 months ago

@wannacfuture is there something in github api which provides the timestamps for the requested reviewers

https://docs.github.com/en/rest/pulls/review-requests?apiVersion=2022-11-28#get-all-requested-reviewers-for-a-pull-request

you can use octokit. There is createdAt field representing the timestamp or review request for certain reviewers. I think there is already a function for that: getReviewRequests

EtherealGlow commented 10 months ago
{
  "users": [
    {
      "login": "octocat",
      "id": 1,
      "node_id": "MDQ6VXNlcjE=",
      "avatar_url": "https://github.com/images/error/octocat_happy.gif",
      "gravatar_id": "",
      "url": "https://api.github.com/users/octocat",
      "html_url": "https://github.com/octocat",
      "followers_url": "https://api.github.com/users/octocat/followers",
      "following_url": "https://api.github.com/users/octocat/following{/other_user}",
      "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
      "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
      "subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
      "organizations_url": "https://api.github.com/users/octocat/orgs",
      "repos_url": "https://api.github.com/users/octocat/repos",
      "events_url": "https://api.github.com/users/octocat/events{/privacy}",
      "received_events_url": "https://api.github.com/users/octocat/received_events",
      "type": "User",
      "site_admin": false
    }
  ],
  "teams": [
    {
      "id": 1,
      "node_id": "MDQ6VGVhbTE=",
      "url": "https://api.github.com/teams/1",
      "html_url": "https://github.com/orgs/github/teams/justice-league",
      "name": "Justice League",
      "slug": "justice-league",
      "description": "A great team.",
      "privacy": "closed",
      "notification_setting": "notifications_enabled",
      "permission": "admin",
      "members_url": "https://api.github.com/teams/1/members{/member}",
      "repositories_url": "https://api.github.com/teams/1/repos",
      "parent": null
    }
  ]
}

In this example response I couldnt find a createdAt field

wannacfuture commented 10 months ago

@EtherealGlow Please take a look at the link I have provided again.

/repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers image

EtherealGlow commented 10 months ago

i am not following something because i think thats for requesting reviews not for getting all requested reviews i could not find a created at in this https://api.github.com/repos/EtherealGlow/ubiquibot/pulls/25/requested_reviewers

whilefoo commented 10 months ago

@wannacfuture your API call is to request a reviewer not listing them like @EtherealGlow said. Instead of requested reviewers API, I think we can use events API, it includes review_requested event and has a timestamp.

EtherealGlow commented 10 months ago

Ohhh that makes it easy

EtherealGlow commented 10 months ago

i am tired of this bot 😢 UbiquiBot Error: Invalid repo config: data must NOT have additional properties. Unnecessary properties: evmNetworkId undefined error ubiquibot EtherealGlow 1761727853 25

EtherealGlow commented 10 months ago

@whilefoo i even tried this config https://github.com/rndquu-org/test-repo/blob/6613b3bf91462018d1cec1b8f09eb27d072f8fc6/.github/ubiquibot-config.yml still doesnt work

EtherealGlow commented 10 months ago

Any idea why the bot might not be working, the config is right

whilefoo commented 10 months ago

@EtherealGlow can you link me your config?

EtherealGlow commented 10 months ago

@whilefoo https://github.com/EtherealGlow/ubiquibot/blob/development/.github/ubiquibot-config.yml

whilefoo commented 10 months ago

can you try running the bot with latest development branch and check if the issue is still present?

EtherealGlow commented 10 months ago

wait just a day or two this is almost done

EtherealGlow commented 10 months ago

uhhh what