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

Implement hook for mentions in comments #1

Open
0xdeadbeefJERKY opened this issue Feb 28, 2020 · 2 comments
Open

Implement hook for mentions in comments #1

0xdeadbeefJERKY opened this issue Feb 28, 2020 · 2 comments
Labels
enhancement New feature or request

Comments

@0xdeadbeefJERKY
Copy link

Implement webhook that parses the content of a comment (e.g., within Issues, PRs) and identifies Gitea username mentions (e.g., via regex). Additionally, create a mapping between Gitea accounts and their corresponding Keybase accounts, allowing the webhook to specifically ping the user within Keybase that owns the Gitea account being mentioned in the comment.

@0xdeadbeefJERKY 0xdeadbeefJERKY changed the title Implement hooks for mentions in comments Implement hook for mentions in comments Feb 28, 2020
@vladionescu vladionescu added the enhancement New feature or request label Feb 28, 2020
@vladionescu
Copy link
Owner

vladionescu commented Feb 28, 2020

Assuming the Gitea comment contains an @username string, Keybase should automatically make that clickable and a mention as if you typed it yourself in chat.

The problem will be when someone has a different Gitea username from their Keybase username. For instance I'm @vladi on Keybase but @vlad on the local Gitea server.

Since this bot already uses a DB for storing other stuff, we can store a mapping of Gitea<->Keybase usernames and, when the bot sees a Gitea user mentioned it can @ them using their Keybase username.

I'm thinking we can let people opt-in to getting mentioned in chat whenever a certain word appears in a Gitea payload (comment, commit message, etc).

!gitea notifyme <word>

People can use this to ask the bot to mention them whenever a certain word appears. Initially it can be used for the username mapping, but it's just as usable for watching for activity concerning a certain thing, like "infrastructure" or "javascript".

@NiorVector
Copy link

Problem solved, the gitea user profile requires a "fullname" in order to be displayed. I recommend all of us using our keybase usernames with the @ symbol. Example: fullname: @malwareunicorn

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants