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

Selectively enabling comment incentives per task #780

Open
0x4007 opened this issue Sep 18, 2023 · 35 comments · May be fixed by #840
Open

Selectively enabling comment incentives per task #780

0x4007 opened this issue Sep 18, 2023 · 35 comments · May be fixed by #840

Comments

@0x4007
Copy link
Member

0x4007 commented Sep 18, 2023

This is a great example of the assignee doing research and it would be elegant for an admin or billing_manager to be able to issue a slash command to force comment incentives to be calculated for a contributor no matter what their recognized role to be after the issue is closed out.

For example /comment-incentives @keyrxng @user2 @user3 true

So even if they are the assignee when the issue is closed as complete, we have the ability to make an exception on this specific issue for them to claim their comment incentives.

This command parameters should work in any order (but the slash command must be first) like our other commands.

I would like to hear suggestions on a more concise command name because that current one seems a bit long.

So we do not want to shackling hunters but enforcing a template or structure I get that and given the observations in the table below I want to make the following points:

Originally posted by @Keyrxng in #777 (comment)

@Keyrxng
Copy link
Member

Keyrxng commented Sep 18, 2023

As I was fetching the research this exact bounty came to my mind after learning recently assignees don't get comment incentives, I'll be quicker next time ;)

I think it should just be

/incentivize keyrxng

This command should work in any order, like our other commands.

In my head I thought if they are the assignee of the task then they'll receive no rewards as standard, after the PR is merged and all rewards are allocated then the command is invoked and the bot hoovers up the assignee's comments, does the calc and generates the permit.

But in any order would imply that this command can be invoked from issue open not just issue close.

So would it make sense to follow this path:

  • run command ``/incentivize keyrxng''
  • if issue is closed, gather all assignee comments, do the sums and generate the permit
  • if issue is open, just enable rewards for the assignee (is that for the whole issue or from command onwards?) and they can claim alongside the rest of rewards at PR merge either as one or as two separate permits?

@0x4007
Copy link
Member Author

0x4007 commented Sep 18, 2023

To simplify the implementation, the bot should just look for the instance of this comment in the issue at the moment the issue is closed as completed.

If for some reason it was closed as completed, but the admin wanted to provide these rewards, they simply post the command, and then re-open and re-close as complete.

"any order" refers to the arguments. true or false for the state and the usernames (any amount of) should work

/incentivize isn't specific enough. You already would have received the assignee incentive in the above scenario.

@Keyrxng
Copy link
Member

Keyrxng commented Sep 18, 2023

To simplify the implementation, the bot should just look for the instance of this comment in the issue at the moment the issue is closed as completed.

I'm hearing that the command itself is more of a pseudo command and acts more like a placeholder than anything else?

We can create a Pre callBack for issueClosed events and check before each issue is closed for the placeholder, if it exists pass in the usernames that comment contains and calculate their incentives before closing the issue outright?

It can be safeguarded by checking whoever wrote the command has sufficient access/authority to do so

Obv still add it to the list of available commands via the /help command but the command itself doesn't actually execute any logic. It could be logged "x has started earning rewards on issue 123" when invoked but the actual logic would be executed as part of the issueClose pre handler.

@BeanieMen
Copy link
Contributor

it might be rude of me but can i do this issue?

@Keyrxng
Copy link
Member

Keyrxng commented Sep 18, 2023

@me505 if that was aimed at myself don't be silly nothing rude about it, I'm here for the discussion at the moment and would have taken the bounty if left unassigned in a week or so. So you carry on mate

@BeanieMen
Copy link
Contributor

cant we just add a helper function which see who has been incentived by /comment-incentives @Keyrxng @user2 @user3 true and returns a list of the users to and iterates to see who can be incentivized inincentivizeComments post callback

@BeanieMen
Copy link
Contributor

/start

@ubiquibot
Copy link

ubiquibot bot commented Sep 18, 2023

Deadline Mon, 18 Sep 2023 20:44:27 UTC
Registered Wallet 0x5387ab162D3Fc48a8c9857517E36cF4B55dE8c1a
Tips:
  • Use /wallet 0x0000...0000 if you want to update your registered payment wallet address @user.
  • Be sure to open a draft pull request as soon as possible to communicate updates on your progress.
  • Be sure to provide timely updates to us when requested, or you will be automatically unassigned from the bounty.

    @0x4007
    Copy link
    Member Author

    0x4007 commented Sep 18, 2023

    We can create a Pre callBack for issueClosed events and check before each issue is closed for the placeholder, if it exists pass in the usernames that comment contains and calculate their incentives before closing the issue outright?

    It can be safeguarded by checking whoever wrote the command has sufficient access/authority to do so

    Yes this all sounds good to me.

    cant we just add a helper function which see who has been incentived by /comment-incentives @Keyrxng @user2 @user3 true and returns a list of the users to and iterates to see who can be incentivized inincentivizeComments post callback

    I think the simplest implementation would be if we use the comments as the "database" and the bot looks for this comment before posting all of the payments.

    @BeanieMen
    Copy link
    Contributor

    should the bot incentivize everyone by default @pavlovcik?

    @Keyrxng
    Copy link
    Member

    Keyrxng commented Sep 18, 2023

    Weird that on my repo where I implemented the whitespace removal you can clearly see the formatting for my table has slightly improved vs the one above, the changes have been merged in so they should be reflected here.

    Not the end of the world but deffo an annoyance for me personally but if you think it's worth a debug I will look into it @pavlovcik

    @0x4007
    Copy link
    Member Author

    0x4007 commented Sep 18, 2023

    I couldnt figure out how to remove the monospace background artifact. I wouldnt go out of your way to solve it because I dont think its an easy fix, and its so low priority.

    @0x4007
    Copy link
    Member Author

    0x4007 commented Sep 18, 2023

    should the bot incentivize everyone by default @pavlovcik?

    No but i'm pretty sure that this bounty has nothing to do with controlling that. That was handled as part of a different spec I believe.

    @whilefoo
    Copy link
    Collaborator

    If for some reason it was closed as completed, but the admin wanted to provide these rewards, they simply post the command, and then re-open and re-close as complete.

    I think that won't work because permit was possibly already generated for that user and we have rule: one permit per user per issue

    @0x4007
    Copy link
    Member Author

    0x4007 commented Sep 20, 2023

    If for some reason it was closed as completed, but the admin wanted to provide these rewards, they simply post the command, and then re-open and re-close as complete.

    I think that won't work because permit was possibly already generated for that user and we have rule: one permit per user per issue

    It seems that the issuer might be the only one who would get screwed in this case. But even if that is an issue, an admin can delete their permit comment, and then regenerate it as long as they didn't already claim the first one the nonce is still valid.

    @ubiquibot
    Copy link

    ubiquibot bot commented Sep 26, 2023

    @me505 - Releasing the bounty back to dev pool because the allocated duration already ended!
    Last activity time: Mon Sep 18 2023 16:52:43 GMT+0000 (Coordinated Universal Time)

    @BeanieMen
    Copy link
    Contributor

    /start

    @ubiquibot
    Copy link

    ubiquibot bot commented Sep 26, 2023

    Deadline Tue, 26 Sep 2023 08:29:10 UTC
    Registered Wallet 0x5387ab162D3Fc48a8c9857517E36cF4B55dE8c1a
    Tips:
    • Use /wallet 0x0000...0000 if you want to update your registered payment wallet address @user.
    • Be sure to open a draft pull request as soon as possible to communicate updates on your progress.
    • Be sure to provide timely updates to us when requested, or you will be automatically unassigned from the bounty.

      @ubiquibot
      Copy link

      ubiquibot bot commented Oct 4, 2023

      Do you have any updates @me505? If you would like to release the bounty back to the DevPool, please comment /stop
      Last activity time: Sat Sep 30 2023 09:42:15 GMT+0000 (Coordinated Universal Time)

      @ubiquibot
      Copy link

      ubiquibot bot commented Oct 9, 2023

      Do you have any updates @me505? If you would like to release the bounty back to the DevPool, please comment /stop
      Last activity time: Thu Oct 05 2023 16:24:49 GMT+0000 (Coordinated Universal Time)

      @BeanieMen
      Copy link
      Contributor

      Wait James mcgee

      @ubiquibot
      Copy link

      ubiquibot bot commented Oct 14, 2023

      Do you have any updates @me505? If you would like to release the bounty back to the DevPool, please comment /stop
      Last activity time: Tue Oct 10 2023 14:27:58 GMT+0000 (Coordinated Universal Time)

      @ubiquibot
      Copy link

      ubiquibot bot commented Oct 28, 2023

      Do you have any updates @me505? If you would like to release the bounty back to the DevPool, please comment /stop
      Last activity time: Tue Oct 24 2023 04:42:23 GMT+0000 (Coordinated Universal Time)

      @BeanieMen
      Copy link
      Contributor

      Hmm

      Copy link

      ubiquibot bot commented Nov 1, 2023

      Do you have any updates @me505? If you would like to release the bounty back to the DevPool, please comment /stop
      Last activity time: Sat Oct 28 2023 06:00:11 GMT+0000 (Coordinated Universal Time)

      @BeanieMen
      Copy link
      Contributor

      Waiting for the refactor to be done

      Copy link

      ubiquibot bot commented Nov 6, 2023

      Do you have any updates @me505? If you would like to release the bounty back to the DevPool, please comment /stop
      Last activity time: Wed Nov 01 2023 12:39:33 GMT+0000 (Coordinated Universal Time)

      @BeanieMen
      Copy link
      Contributor

      My guy wait the refactor ain't done yet

      Copy link

      ubiquibot bot commented Nov 10, 2023

      Do you have any updates @me505? If you would like to release the bounty back to the DevPool, please comment /stop
      Last activity time: Mon Nov 06 2023 08:54:59 GMT+0000 (Coordinated Universal Time)

      @BeanieMen
      Copy link
      Contributor

      My guy wait the refactor ain't done yet

      .

      Copy link

      ubiquibot bot commented Nov 15, 2023

      Do you have any updates @me505? If you would like to release the bounty back to the DevPool, please comment /stop
      Last activity time: Sat Nov 11 2023 08:31:54 GMT+0000 (Coordinated Universal Time)

      @BeanieMen
      Copy link
      Contributor

      @pavlovcik can you please also update the follow up time?

      @Keyrxng
      Copy link
      Member

      Keyrxng commented Nov 15, 2023

      pavlovcik can you please also update the follow up time?

      @me505 dude why don't you just unassign yourself using the UI and when things are ready the team will @ you to reassign yourself

      Copy link

      ubiquibot bot commented Nov 19, 2023

      Do you have any updates @me505? If you would like to release the bounty back to the DevPool, please comment /stop
      Last activity time: Wed Nov 15 2023 14:34:49 GMT+0000 (Coordinated Universal Time)

      Copy link

      ubiquibot bot commented Nov 22, 2023

      @me505 - Releasing the bounty back to dev pool because the allocated duration already ended!
      Last activity time: Wed Nov 15 2023 14:34:49 GMT+0000 (Coordinated Universal Time)

      Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
      Projects
      None yet
      4 participants