name: Comment to label

on:
  issues:
    types: [labeled]
  workflow_call:

jobs:
  issueLabeled:
    runs-on: ubuntu-22.04
    steps:
      - name: Bounty explanation
        uses: peter-evans/create-or-update-comment@v3
        if: github.event.label.name == '💰bounty'
        with:
          token: ${{ secrets.GITHUB_TOKEN }}
          issue-number: ${{ github.event.issue.number }}
          body: >
            There is a bounty on this issue. The amount is in the title. The reward will be awarded to the first person or group of people whose solution is accepted and merged.


            In some cases, we may assign the issue to specific contributors. We expect contributors to provide a PR in a reasonable time frame or, in case of an extensive work, updates on their progress. We will unassign the issue if we feel the assignee is not responsive or has abandoned the task.


            Read the [full conditions and details](https://github.com/haveno-dex/haveno/blob/master/docs/bounties.md) of our bounty system.
