# Working on a Bounty

## 1 - Look for an issue on the [app.lightningbounties.com](https://app.lightningbounties.com/) feed

In this example, we are using:[ 'Add color to logo in this repo'](https://github.com/MIT-Bitcoin-2024/experiments-1/issues/34)

<figure><img src="https://4191743023-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgvH1HLwrajw9XplSBFfy%2Fuploads%2F5q4OzuvWrzx9pVKVV9uI%2Fimage.png?alt=media&#x26;token=d6887c3d-632e-4b40-a60b-f3dfd53708c4" alt=""><figcaption></figcaption></figure>

### 1.1 - Click on the issue to get details

<figure><img src="https://4191743023-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgvH1HLwrajw9XplSBFfy%2Fuploads%2FsHTKskPuQNo1iDmmiYEn%2Fimage.png?alt=media&#x26;token=d22a8ad6-e514-4602-ad3f-db777433d99e" alt=""><figcaption></figcaption></figure>

### 1.2 - Click on 🔗 to see the issue in GitHub

<figure><img src="https://4191743023-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgvH1HLwrajw9XplSBFfy%2Fuploads%2Fhi57eaiLpMRPdYn0SPBG%2Fimage.png?alt=media&#x26;token=5082be95-39c9-433a-891f-d11c8fd07bc4" alt=""><figcaption></figcaption></figure>

## 2 - Fix the issue

### 2.1 - Fork the owner repo to your repository

<figure><img src="https://4191743023-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgvH1HLwrajw9XplSBFfy%2Fuploads%2FkFXtku83S5CrMdt4MlRb%2Fimage.png?alt=media&#x26;token=f4db43a8-86ac-4e4e-a8bf-68ee9ab56fa2" alt=""><figcaption></figcaption></figure>

### 2.2 - Work on the issue

This is the part where developers work on fixing the code after they fork the repo.  🧑‍💻

*In this example, the colored logo has been added to the repo as* [*issue* ](https://github.com/MIT-Bitcoin-2024/experiments-1/issues/34)*requested.*&#x20;

<figure><img src="https://4191743023-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgvH1HLwrajw9XplSBFfy%2Fuploads%2FOJqfyRXKs1vrwEsRwqaI%2Fimage.png?alt=media&#x26;token=d0ded3d3-3acd-4421-8b89-0881fd2d947e" alt=""><figcaption></figcaption></figure>

## 3 - Create a Pull Request

Create a pull request to the bounty poster repo.

<figure><img src="https://4191743023-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgvH1HLwrajw9XplSBFfy%2Fuploads%2Frh7o89K5pcouyPI18nw2%2Fimage.png?alt=media&#x26;token=f4e8497d-6159-4a90-96e1-b51667cfad69" alt=""><figcaption></figcaption></figure>

### 3.1 - Close the issue you fix on the Pull Request description

<figure><img src="https://4191743023-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgvH1HLwrajw9XplSBFfy%2Fuploads%2FidcS1gxAoID7eMr83671%2Fimage.png?alt=media&#x26;token=1770de52-b590-4d56-85aa-7bd5b52a2c59" alt=""><figcaption></figcaption></figure>

## <mark style="background-color:orange;">⚠️ Note: This step is crucial⚠️</mark>

### If you forget to add the tag `close #(issue-number)`,  & the PR is already merged.&#x20;

### You have 2 options:

<details>

<summary><mark style="background-color:orange;"><strong>[1]</strong></mark><strong>  Edit the Pull Request Message</strong> </summary>

#### <mark style="background-color:orange;">**We got you covered! 👇**</mark>

***

### 1. Go to your merged PR and Click Into It

<figure><img src="https://images.tango.us/workflows/2cc8efaf-a4f0-4968-9904-46440dbc5702/steps/4e2d550c-f01d-4237-a4f7-c6fe181421dd/62131c99-b762-490b-a637-812a364fee5a.png?crop=focalpoint&#x26;fit=crop&#x26;fp-x=0.1544&#x26;fp-y=0.5551&#x26;fp-z=2.2887&#x26;w=1200&#x26;border=2%2CF4F2F7&#x26;border-radius=8%2C8%2C8%2C8&#x26;border-radius-inner=8%2C8%2C8%2C8&#x26;blend-align=bottom&#x26;blend-mode=normal&#x26;blend-x=0&#x26;blend-w=1200&#x26;blend64=aHR0cHM6Ly9pbWFnZXMudGFuZ28udXMvc3RhdGljL21hZGUtd2l0aC10YW5nby13YXRlcm1hcmstdjIucG5n&#x26;mark-x=236&#x26;mark-y=357&#x26;m64=aHR0cHM6Ly9pbWFnZXMudGFuZ28udXMvc3RhdGljL2JsYW5rLnBuZz9tYXNrPWNvcm5lcnMmYm9yZGVyPTYlMkNGRjc0NDImdz0zNzYmaD03MiZmaXQ9Y3JvcCZjb3JuZXItcmFkaXVzPTEw" alt="1. Go to your merged PR and Click Into It"><figcaption><p>Step 1 </p></figcaption></figure>

### 2. Click the "..." button at the top-right of your PR description

<figure><img src="https://images.tango.us/workflows/2cc8efaf-a4f0-4968-9904-46440dbc5702/steps/2dbdf227-9745-4e4d-9b13-23c503433fe9/aa31a1c4-1ac4-48e0-8fbc-f75165c1328e.png?crop=focalpoint&#x26;fit=crop&#x26;fp-x=0.6504&#x26;fp-y=0.4077&#x26;fp-z=2.7859&#x26;w=1200&#x26;border=2%2CF4F2F7&#x26;border-radius=8%2C8%2C8%2C8&#x26;border-radius-inner=8%2C8%2C8%2C8&#x26;blend-align=bottom&#x26;blend-mode=normal&#x26;blend-x=0&#x26;blend-w=1200&#x26;blend64=aHR0cHM6Ly9pbWFnZXMudGFuZ28udXMvc3RhdGljL21hZGUtd2l0aC10YW5nby13YXRlcm1hcmstdjIucG5n&#x26;mark-x=554&#x26;mark-y=328&#x26;m64=aHR0cHM6Ly9pbWFnZXMudGFuZ28udXMvc3RhdGljL2JsYW5rLnBuZz9tYXNrPWNvcm5lcnMmYm9yZGVyPTYlMkNGRjc0NDImdz05MyZoPTEyOSZmaXQ9Y3JvcCZjb3JuZXItcmFkaXVzPTEw" alt="2. Click the &#x22;...&#x22; button at the top-right of your PR description"><figcaption><p>Step 2 </p></figcaption></figure>

### 3. Select "Edit"

<figure><img src="https://images.tango.us/workflows/2cc8efaf-a4f0-4968-9904-46440dbc5702/steps/83f6f31a-08b7-462c-953a-206ecc35eb76/3632c0ea-dd2b-407d-9cbe-a4683defcbe7.png?crop=focalpoint&#x26;fit=crop&#x26;fp-x=0.5852&#x26;fp-y=0.5517&#x26;fp-z=2.1423&#x26;w=1200&#x26;border=2%2CF4F2F7&#x26;border-radius=8%2C8%2C8%2C8&#x26;border-radius-inner=8%2C8%2C8%2C8&#x26;blend-align=bottom&#x26;blend-mode=normal&#x26;blend-x=0&#x26;blend-w=1200&#x26;blend64=aHR0cHM6Ly9pbWFnZXMudGFuZ28udXMvc3RhdGljL21hZGUtd2l0aC10YW5nby13YXRlcm1hcmstdjIucG5n&#x26;mark-x=386&#x26;mark-y=352&#x26;m64=aHR0cHM6Ly9pbWFnZXMudGFuZ28udXMvc3RhdGljL2JsYW5rLnBuZz9tYXNrPWNvcm5lcnMmYm9yZGVyPTYlMkNGRjc0NDImdz00MjkmaD04MiZmaXQ9Y3JvcCZjb3JuZXItcmFkaXVzPTEw" alt="3. Select &#x22;Edit&#x22;"><figcaption><p>Step 3</p></figcaption></figure>

### 4. Add close #\[issue-number] to the PR description text

<mark style="background-color:orange;">**Example**</mark>: If fixing issue `#5`, add `close #5` to your PR description.

<figure><img src="https://images.tango.us/workflows/2cc8efaf-a4f0-4968-9904-46440dbc5702/steps/8c78e0a9-8fc1-48d1-9458-acda6930cb8d/1019ec27-54fa-47de-80b6-56bbbaf2fcb6.png?crop=focalpoint&#x26;fit=crop&#x26;fp-x=0.5000&#x26;fp-y=0.5000&#x26;w=1200&#x26;border=2%2CF4F2F7&#x26;border-radius=8%2C8%2C8%2C8&#x26;border-radius-inner=8%2C8%2C8%2C8&#x26;blend-align=bottom&#x26;blend-mode=normal&#x26;blend-x=0&#x26;blend-w=1200&#x26;blend64=aHR0cHM6Ly9pbWFnZXMudGFuZ28udXMvc3RhdGljL21hZGUtd2l0aC10YW5nby13YXRlcm1hcmstdjIucG5n&#x26;mark-x=122&#x26;mark-y=192&#x26;m64=aHR0cHM6Ly9pbWFnZXMudGFuZ28udXMvc3RhdGljL2JsYW5rLnBuZz9tYXNrPWNvcm5lcnMmYm9yZGVyPTQlMkNGRjc0NDImdz0zNzMmaD0xNjcmZml0PWNyb3AmY29ybmVyLXJhZGl1cz0xMA%3D%3D" alt="4. Add close #[issue-number] to the PR description text"><figcaption><p>Step 4 </p></figcaption></figure>

### 5. Click on "Update Comment"

<figure><img src="https://images.tango.us/workflows/2cc8efaf-a4f0-4968-9904-46440dbc5702/steps/2491ffd4-6656-42c6-9251-8761f051bcc1/f739b2f6-3f6c-46ba-b6f7-5292fc690195.png?crop=focalpoint&#x26;fit=crop&#x26;fp-x=0.6085&#x26;fp-y=0.6863&#x26;fp-z=2.3474&#x26;w=1200&#x26;border=2%2CF4F2F7&#x26;border-radius=8%2C8%2C8%2C8&#x26;border-radius-inner=8%2C8%2C8%2C8&#x26;blend-align=bottom&#x26;blend-mode=normal&#x26;blend-x=0&#x26;blend-w=1200&#x26;blend64=aHR0cHM6Ly9pbWFnZXMudGFuZ28udXMvc3RhdGljL21hZGUtd2l0aC10YW5nby13YXRlcm1hcmstdjIucG5n&#x26;mark-x=423&#x26;mark-y=344&#x26;m64=aHR0cHM6Ly9pbWFnZXMudGFuZ28udXMvc3RhdGljL2JsYW5rLnBuZz9tYXNrPWNvcm5lcnMmYm9yZGVyPTYlMkNGRjc0NDImdz0zNTUmaD05OCZmaXQ9Y3JvcCZjb3JuZXItcmFkaXVzPTEw" alt="5. Click on &#x22;Update Comment&#x22;"><figcaption><p>Step 5</p></figcaption></figure>

### # That's it!

This connects your PR to the issue and will trigger your bounty payment automatically.

***

### ℹ️ Important Notes:

* The `close`keyword must be in the PR description itself, not in regular comments.
* Adding this connection after merging will automatically trigger the lightning bounty payment.&#x20;
* If you cannot edit the PR, ask the repo owner to add the `close`syntax for you.

</details>

<details>

<summary><mark style="background-color:orange;"><strong>[2]</strong></mark><strong> Creating a New Pull Request When You Forgot to Add close #issue-number</strong></summary>

If your original pull request has been merged but you forgot to include the `close #issue-number` syntax needed for Lightning Bounties payment:

## Steps to Create a New PR

### **1. Create a new branch** from the current main/master branch

{% code fullWidth="false" %}

```bash
git checkout main
git pull
git checkout -b fix-bounty-issue-reference
```

{% endcode %}

### **2. Make a minimal change** (can be as simple as updating documentation or adding a comment)

*Example: Add a small comment or documentation update* :arrow\_down:

{% code fullWidth="true" %}

```bash
git add .
git commit -m "Add reference to close issue #X for Lightning Bounty"
```

{% endcode %}

### 3. Push your branch

```bash
git push origin fix-bounty-issue-reference
```

### **4. Create the new pull request**

* Go to the repository on GitHub
* Click "Compare & pull request"
* **Important**: Include `close #X` or `closes #X` in the PR description (where X is your issue number)
* Explain that this PR is to properly close the issue for Lightning Bounty payment
* Reference your original PR: "This PR references the work completed in #Y"

### ℹ️ Important Notes:&#x20;

* The repository owner will need to review and approve this new PR
* This is a technical solution to trigger the Lightning Bounties payment system
* The minimal change is necessary as GitHub requires actual content changes for a PR

</details>

## 4 - Claim reward in [app.lightningbounties.com](https://app.lightningbounties.com/)

Once the Pull Request gets approved, the developer can claim the reward

<figure><img src="https://4191743023-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgvH1HLwrajw9XplSBFfy%2Fuploads%2FHuhPuuZGTms5NBMieTaL%2Fimage.png?alt=media&#x26;token=fca49e9a-8cfe-498e-b85c-e4246d2456dd" alt=""><figcaption></figcaption></figure>

### 4.1 - Click on "Claim Reward" and add pull requested number

<figure><img src="https://4191743023-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgvH1HLwrajw9XplSBFfy%2Fuploads%2Fs0TUIMHFJfR0IXwCw0Wq%2Fimage.png?alt=media&#x26;token=6bca6f63-83ca-4e52-81cc-d40c4d1f16a0" alt=""><figcaption></figcaption></figure>

### 4.2 - Reward will be added to the balance

<figure><img src="https://4191743023-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgvH1HLwrajw9XplSBFfy%2Fuploads%2FzWrVW8b5HtasPWzMuv8E%2Fimage.png?alt=media&#x26;token=6b0c68ae-4647-4688-87a6-78edf112b6ba" alt=""><figcaption></figcaption></figure>
