Skip to content

EresDevOrg/conversation-rewards

 
 

Repository files navigation

@ubiquibot/conversation-rewards

As of 28 February: test driven development to aggregate all necessary information based on a URL to an issue.

  • pass in closed as complete issue URL and receive all the timeline events and activities of all humans who helped close the issue as complete.
  • most importantly: this can inherit bot authentication and link pull requests to issues in private repositories.

Be sure to review all *.test.* files for implementation details.

Data structure

{
  "userName": {
    "total": 40.5,
    "task": {
      "reward": 37.5,
      "multiplier": 1
    },
    "comments": [
      {
        "content": "comment content",
        "url": "https://url-to-item",
        "type": 18,
        "score": {
          "formatting": {
            "content": {
              "p": {
                "count": 16,
                "score": 1
              }
            },
            "wordValue": 0.1,
            "formattingMultiplier": 1
          },
          "reward": 0.8,
          "relevance": 0.5
        }
      }
    ]
  }
}

Reward formula: ((count * wordValue) * (score * formattingMultiplier) * n) * relevance + task.reward = total

Plugin configuration

Here is a possible valid configuration to enable this plugin. See these files for more details.

plugin: ubiquibot/conversation-rewards
with:
  evmNetworkId: 100
  evmPrivateEncrypted: "encrypted-key"
  erc20RewardToken: "0xe91D153E0b41518A2Ce8Dd3D7944Fa863463a97d"
  dataCollection:
    maxAttempts: 10
    delayMs: 10000
  incentives:
    requirePriceLabel: true
    contentEvaluator:
      multipliers:
        - select: [ISSUE_SPECIFICATION]
          relevance: 1
        - select: [PULL_AUTHOR]
          relevance: 1
        - select: [PULL_ASSIGNEE]
          relevance: 1
        - select: [PULL_COLLABORATOR]
          relevance: 1
        - select: [PULL_CONTRIBUTOR]
          relevance: 1
    userExtractor:
      redeemTask: true
    dataPurge:
    formattingEvaluator:
      scores:
        br: 0
        code: 1
        p: 1
        em: 0
        img: 0
        strong: 0
        blockquote: 0
        h1: 1
        h2: 1
        h3: 1
        h4: 1
        h5: 1
        h6: 1
        a: 1
        li: 1
        td: 1
        hr: 0
        multipliers:
          - select: [ISSUE_SPECIFICATION]
            formattingMultiplier: 1
            wordValue: 0.1
          - select: [ISSUE_AUTHOR]
            formattingMultiplier: 1
            wordValue: 0.2
          - select: [ISSUE_ASSIGNEE]
            formattingMultiplier: 0
            wordValue: 0
          - select: [ISSUE_COLLABORATOR]
            formattingMultiplier: 1
            wordValue: 0.1
          - select: [ISSUE_CONTRIBUTOR]
            formattingMultiplier: 0.25
            wordValue: 0.1
          - select: [PULL_SPECIFICATION]
            formattingMultiplier: 0
            wordValue: 0
          - select: [PULL_AUTHOR]
            formattingMultiplier: 2
            wordValue: 0.2
          - select: [PULL_ASSIGNEE]
            formattingMultiplier: 1
            wordValue: 0.1
          - select: [PULL_COLLABORATOR]
            formattingMultiplier: 1
            wordValue: 0.1
          - select: [PULL_CONTRIBUTOR]
            formattingMultiplier: 0.25
            wordValue: 0.1
      permitGeneration:
      githubComment:
        post: true
        debug: false

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 53.9%
  • HTML 46.0%
  • Shell 0.1%