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

feat(bot): Reduce bot's reaction time down to less then 5 seconds #142

Open
frol opened this issue Jul 11, 2024 · 3 comments
Open

feat(bot): Reduce bot's reaction time down to less then 5 seconds #142

frol opened this issue Jul 11, 2024 · 3 comments
Assignees
Labels
bot development Task for development
Milestone

Comments

@frol
Copy link
Contributor

frol commented Jul 11, 2024

This issue is just a placeholder for a lengthy discussion.

This will require us to use a different approach than our current one. Instead of polling for updates, let's see if there is a way to use webhooks on being mentioned or to plug into Mobile push notifications.

@frol frol added the bot label Jul 11, 2024
@akorchyn
Copy link
Collaborator

akorchyn commented Jul 11, 2024

I believe, webhook is not possible with our current implementation

https://docs.github.com/en/webhooks/types-of-webhooks

Webhooks are supported per repo/org/GitHub app.
But we use general GitHub rest user API (not an app)

So It was the tradeoff that we have made initially.
We didnt want to require maintainer to install the app and we wanted to rely on mention in any repo

@ftdgoodluck ftdgoodluck added this to the [2] post-MVP milestone Jul 11, 2024
@ftdgoodluck ftdgoodluck added the development Task for development label Jul 11, 2024
@frol frol modified the milestones: [2] post-MVP, [3] Launch Jul 11, 2024
@elliotBraem
Copy link

What if we modified this to crosspost pull-requests to social contract, and then a race of sloths bot replied there?

It would be a different approach, but this way pull requests can stay focused on the discussion without interruption from bot comments and I think it also lends itself to better UX flows and more opportunities-- it would be able to use existing BOS Notifications fellowship work, integration with nearbuilders.org/projects, crossposting to Devhub communities... and of course, more activity on near.

Repositories would need to introduce the race of sloths git workflows.

For example, here is a git workflow with script for posting a release: NEARBuilders/near-bos-webcomponent#41

Looks like we can get PR number from:

the easiest way I found is using the github context. The following example shows how to set it to an environment variable.

env:
PR_NUMBER: ${{ github.event.number }}
(https://stackoverflow.com/questions/59077079/how-to-get-pull-request-number-within-github-actions-workflow)

@frol
Copy link
Contributor Author

frol commented Jul 23, 2024

@elliotBraem the whole point of Race of Sloths design is to be frictionless for those who only use GutHub. Adding BOS notifications at this point will drop participation rate to zero

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bot development Task for development
Projects
Status: 📋 Backlog
Development

No branches or pull requests

4 participants