Skip to content

Commit

Permalink
Integrate fellowship-process-bot (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
rzadp authored Sep 7, 2023
1 parent 1ffea43 commit 8d77773
Show file tree
Hide file tree
Showing 17 changed files with 601 additions and 111 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: RFC propose
name: RFC action

on:
issue_comment:
Expand All @@ -8,11 +8,11 @@ permissions:
pull-requests: write

jobs:
rfc-propose:
name: Propose an RFC creation transaction
if: ${{ github.event.issue.pull_request && startsWith(github.event.comment.body, '/rfc-propose') }}
rfc-action:
name: Handle an RFC command
if: ${{ github.event.issue.pull_request && startsWith(github.event.comment.body, '/rfc') }}
runs-on: ubuntu-latest
steps:
- uses: paritytech/rfc-propose@main
- uses: paritytech/rfc-action@main
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
48 changes: 42 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,32 +8,68 @@ Learn more about the RFC proposal process [here](https://github.com/polkadot-fel

## Usage

On an RFC Pull Request, add a comment starting with `/rfc`.

### Commands

1. Propose

Proposes the creation of a referendum aiming to approve the given RFC.

```
/rfc propose
```

Will result in a comment response with instructions to create an on-chain referendum.

2. Process

After the RFC referendum was confirmed, it processes the Pull Request (by merging or closing it).

```
/rfc process <block hash of when the referendum was confirmed>
```

If you're not sure where to get this block hash,
send a `/rfc process` command and the action will respond with more instructions.

## Configuration

To use the action in a repository, add a job that is going to run on specific comments on PRs:

```yaml
name: RFC propose
name: RFC action

on:
issue_comment:
types: [created]

permissions:
pull-requests: write
contents: write

jobs:
rfc-propose:
name: Propose an RFC creation transaction
if: ${{ github.event.issue.pull_request && startsWith(github.event.comment.body, '/rfc-propose') }}
rfc-action:
name: Handle an RFC-relate command in a RFC proposal PR
if: ${{ github.event.issue.pull_request && startsWith(github.event.comment.body, '/rfc') }}
runs-on: ubuntu-latest
steps:
- uses: paritytech/rfc-propose@main
- uses: paritytech/rfc-action@main
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PROVIDER_URL: "wss://polkadot-collectives-rpc.polkadot.io" # Optional.

```

### Environment variables

The action uses the `GH_TOKEN` environment variable supplied to it.

The built-in `secrets.GITHUB_TOKEN` can be used, as long as it has the `pull-requests` write permissions.
The built-in `secrets.GITHUB_TOKEN` can be used, as long as it has the necessary permissions.

- `pull-requests: write` permission is used to write comments in the PR.
- `contents: write` permission is used to close/merge the PR.

The `PROVIDER_URL` variable can be specified to override the default public endpoint to the Collectives parachain.

A full archive node is needed to process the confirmed referenda.
4 changes: 2 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: '@paritytech/rfc-propose'
description: 'A GitHub Action aiming to help in the creation of RFC proposal referenda.'
name: '@paritytech/rfc-action'
description: 'A GitHub Action aiming to help in the process of the RFC proposal referenda.'
author: 'Parity Technologies'

runs:
Expand Down
Loading

0 comments on commit 8d77773

Please sign in to comment.