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

Edit readme #29

Merged
merged 1 commit into from
Mar 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
102 changes: 44 additions & 58 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,34 @@
# Pattini

[![GitHub Super-Linter](https://github.com/actions/pattini/actions/workflows/linter.yml/badge.svg)](https://github.com/super-linter/super-linter)
![CI](https://github.com/actions/pattini/actions/workflows/ci.yml/badge.svg)
[![Check dist/](https://github.com/actions/pattini/actions/workflows/check-dist.yml/badge.svg)](https://github.com/actions/pattini/actions/workflows/check-dist.yml)
[![CodeQL](https://github.com/actions/pattini/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/actions/pattini/actions/workflows/codeql-analysis.yml)
[![Coverage](./badges/coverage.svg)](./badges/coverage.svg)
Pattini is a GitHub Action designed to incentivize and reward contributors of a GitHub project. When an issue is merged by a maintainer, the pull request author automatically receives a certain amount of ERC-20 (USDC, DAI, ...).

GitHub Action to reward contributors of a given GitHub repository.
## Install

## What is Pattini?
```
npm install
```

## Test

Pattini is a GitHub Action designed to incentivize and reward contributors to your
project for their valuable contributions. With Pattini, when you merge an issue that
has received a satisfactory response from a contributor,
they receive a reward as a token of appreciation.
```
npm test
```

## Usage
## Build

The directory owner opens an issue. At the end of the description, he adds the amount
of the reward that the contributor will receive if the branch he has created is merged.
```
npm run bundle
```

## Use

**Example of description:**
The directory owner creates an issue. At the end of the description, he adds the amount
of the reward that the contributor will receive if the branch he has created is merged.

```texte
Example of an issue description:

We want to enhance our website by adding a Blog page where we can post news.
This will provide a platform for sharing valuable content.
```
We need to add a /blog page where we could post some news.

Tasks:

Expand All @@ -35,70 +38,56 @@ Tasks:
2. Functionality:
- Implement a backend system for managing blog posts.
- Ensure proper routing/navigation to the Blog page.
...

Amount : 15 OP

```

_Format:_
_Mandatory format:_

```md
```

DESCRIPTION...

Amount : AMOUNT OP

```

When the contributor opens a branch from the issue,
the name of the branch must begin with the number of the issue to which he is
responding and end with the number of his wallet on which he
wishes to receive the reward if his code is merge.

**Example of a branch name:**
When the contributor creates a branch from the issue, the name of the branch:

```texte
- **MUST** begin with the number of the corresponding issue
- **MUST** end with the contributor's wallet address

15-Add-blog-page-to-website-0x1234567890
### Example

```

_Format:_

```texte
```
15-Add-blog-page-to-website-0x8CCbFaAe6BC02a73BBe8d6d8017cC8313E4C90A7
```

ISSUE_NUMBER-ISSUE_NAME-0xYOUR_WALLET_ADDRESS
_Mandatory format:_

```
<ISSUE_NUMBER>-<ISSUE_NAME>-<CONTRIBUTOR_WALLET_ADDRESS>
```

When the branch is created, the address at the end is stored in the
blockchain so that the account receiving the reward cannot change.
When the branch is created, the address at the end is stored on-chain so that the account receiving the reward cannot change.

Only one person will be paid per issue (the first merge for that issue).

Sample directory using Pattini:
[Fables de La Fontaine](https://github.com/w3hc/fables-de-lafontaine)

## Integrate Pattini in your project
## Add Pattini to your project

Here are the steps you need to take to get Pattini up and running in your repository:
To get Pattini up and running in your repository:

1 - Use this directory [Pattini Contracts](https://github.com/w3hc/pattini-contracts)
to retrieve the code for the contract to be deployed
1. Use this directory [Pattini Contracts](https://github.com/w3hc/pattini-contracts) to retrieve the code for the contract to be deployed

2 - Deploy the contract manually.
2. Deploy the contract manually (in Hardhat: `pnpm deploy:sepolia`)

3 - Once the contract has been deployed, copy all the contents of the `Pattini.json`
file located in `deployments/sepolia`. In the directory where you want to add
pattini, create the folder `.github/workflows` and create the file `pattini.config.json`
in which you paste the content you copied earlier.
3. Once the contract has been deployed, copy the content of the `Pattini.json` file located in `deployments/sepolia`. In the directory where you want to add Pattini, create the folder `.github/workflows`, create the file `pattini.config.json` and paste the content you copied earlier.

4 - In the same folder (`.github/workflows`),
create the `pattini.yml` file and paste the following code:
4. In the same folder (`.github/workflows`), create the `pattini.yml` file and paste the following code:

```yml

name: Run Pattini

on:
Expand Down Expand Up @@ -141,17 +130,14 @@ jobs:
ISSUE_NUMBER: ${{ env.ISSUE_NUMBER }}
PULL_REQUEST_NUMBER: ${{ github.event.pull_request.number }}
REPOSITORY: ${{ github.repository }}

```

5 - Create a secret variable in the GitHub parameters of your repository.
This must be called `WALLET_OWNER_PRIVATE_KEY` and stores your wallet's private key,
which will be used to pay the fees for the contract to interact with the blockchain.
5. Create a secret variable in the GitHub parameters of your repository. This must be called `WALLET_OWNER_PRIVATE_KEY` and stores your wallet's private key, which will be used to pay the fees for the contract to interact with the blockchain.

6 - Once all these steps have been completed, the actions will be automatically
executed each time a new branch is created and each time a branch is merged.
6. Once all these steps have been completed, the actions will be automatically executed each time a new branch is created and each time a branch is merged.

## Autors
## Authors

- Julien BERANGER
- Théo CLAUDEL

Loading