Skip to content

Commit

Permalink
Merge pull request w3f#111 from mmagician/master
Browse files Browse the repository at this point in the history
Automate the application acceptance process
  • Loading branch information
Noc2 authored Nov 19, 2020
2 parents e705673 + 9c0eedf commit 65b6141
Show file tree
Hide file tree
Showing 2 changed files with 103 additions and 10 deletions.
91 changes: 91 additions & 0 deletions .github/workflows/google_sheet_update.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
name: Google Sheet Update
on:
pull_request_target:
types: [closed]
# on: push

jobs:
fetch:
runs-on: ubuntu-latest
steps:
- name: 'get all added files in the PR'
if: github.event.pull_request.merged == true
id: 'files'
uses: mmagician/get-changed-files@v0.0.1

- uses: actions/checkout@master
if: github.event.pull_request.merged == true
name: Checkout
with:
ref: ${{ github.event.pull_request.head.sha }}

- name: 'parse files'
if: github.event.pull_request.merged == true
id: grant_parser
uses: mmagician/read-file-action@v0.1.2
with:
path: "${{ github.workspace }}/${{ steps.files.outputs.added }}"
# local testing only
# path: 'applications/workflow_testing_12.md'

- name: Get current date
if: github.event.pull_request.merged == true
id: date
run: echo "::set-output name=date::$(date +'%d/%m/%Y')"

- name: Get last row
if: github.event.pull_request.merged == true
id: get_last_row
uses: mmagician/gsheet.action@v0.1.0
with:
spreadsheetId: ${{ secrets.SPREADSHEET_ID }}
startRow: 196
worksheetTitle: "Legal"
env:
GSHEET_CLIENT_EMAIL: ${{ secrets.GSHEET_CLIENT_EMAIL }}
GSHEET_PRIVATE_KEY: ${{ secrets.GSHEET_PRIVATE_KEY }}

- name: 'write the data to a gsheet'
if: github.event.pull_request.merged == true
id: 'update_worksheet'
uses: jroehl/gsheet.action@v1.0.0 # you can specify '@release' to always have the latest changes
with:
spreadsheetId: ${{ secrets.SPREADSHEET_ID }}
commands: | # list of commands, specified as a valid JSON string
[
{
"command": "updateData",
"args":
{
"data": [[
"${{ steps.grant_parser.outputs.team_name }}",
"${{ steps.grant_parser.outputs.team_name }}",
"Open Grants",
"${{ steps.grant_parser.outputs.project_name }}",
"${{ steps.grant_parser.outputs.address }}",
"${{ steps.grant_parser.outputs.contact_name }}",
"${{ steps.grant_parser.outputs.contact_name }}",
"${{ steps.grant_parser.outputs.contact_title }}",
"${{ steps.grant_parser.outputs.contact_email }}",
"${{ steps.grant_parser.outputs.country }}",
"",
"https://github.com/web3/Open-Grants-Program/pull/${{ github.event.pull_request.number }}",
"https://github.com/web3/Open-Grants-Program/pull/${{ github.event.pull_request.number }}",
"USD", "0", "0", "0",
"${{ steps.grant_parser.outputs.total_cost }}",
"",
"",
"Executed",
"https://github.com/web3/Open-Grants-Program/pull/${{ github.event.pull_request.number }}",
"${{ steps.date.outputs.date }}"
]],
"worksheetTitle": "Legal",
"minCol": 1,
"minRow": "${{ steps.get_last_row.outputs.lastRow }}",
"valueInputOption": "USER_ENTERED"
}
}
]
env:
GSHEET_CLIENT_EMAIL: ${{ secrets.GSHEET_CLIENT_EMAIL }}
GSHEET_PRIVATE_KEY: ${{ secrets.GSHEET_PRIVATE_KEY }}
22 changes: 12 additions & 10 deletions applications/application-template.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

> This document is referenced in the terms and conditions and therefore needs to contain all the required information. Don't remove any of the mandatory parts presented in bold letters or as headlines! See the [Open Grants Program Process](https://github.com/w3f/Open-Grants-Program/blob/master/README_2.md) on how to submit a proposal.
* **Project:** The name of the project
* **Proposer:** GitHub username
* **Payment Address:** BTC payment address. We don't accept payments for the program in other currencies at this stage.
* **Project Name:** Name of your project (e.g. DuoSwap Module)
* **Team Name:** Legal name of your team (e.g. Duo)
* **Payment Address:** BTC payment address. We don't accept payments for the program in other currencies at this stage. (e.g. 123mp123...)

*The above combination of your GitHub account and payment address will be your unique identifier during the program. Please keep them safe.*
*The above combination of your GitHub account submitting the application and payment address will be your unique identifier during the program. Please keep them safe.*

## Project Overview :page_facing_up:
If this application in response to an RFP then please indicate this on the first line of this section.
Expand Down Expand Up @@ -37,12 +37,14 @@ Are there any other projects similar to yours? If so, how is your project differ
* Name of team leader
* Names of team members

### Contact
### Contact
* **Contact Name:** Full name of the contact person (e.g. John Brown)
* **Contact Email:** Contact email (e.g. john@duo.com)
* Website
* Email address

### Legal Structure
Please provide the name and registered address of the legal entity executing the project.
* **Registered Address:** Address of your registered legal entity, if available. Please keep it on one line. (e.g. High Street 1, London LK1 234, UK)
* **Registered Legal Entity:** Name of your registered legal entity, if available. (e.g. Duo Ltd.)

### Team's experience
Please describe the team's relevant experience. If the project involves development work, then we'd appreciated if you can single out a few interesting code commits made by team members on their past projects. For research-related grants, references to past publications and projects in a related domain are helpful.
Expand Down Expand Up @@ -71,9 +73,9 @@ To assist you in defining it, we created a document with examples for some grant
* Please indicate the milestone duration, as well as number of Full-Time Employees working on each milestone, and include the number of days along with their cost per day.

### Overview
* **Total Estimated Duration:** Duration of the whole project
* **Full-time equivalent (FTE):** Workload of an employed person ([see](https://en.wikipedia.org/wiki/Full-time_equivalent))
* **Total Costs:** Amount of Payment in BTC for the whole project. The total amount of funding needs to be below $30k at the time of submission.
* **Total Estimated Duration:** Duration of the whole project (e.g. 2 months)
* **Full-time equivalent (FTE):** Workload of an employed person ([see](https://en.wikipedia.org/wiki/Full-time_equivalent)) (e.g. 2 FTE)
* **Total Costs:** Amount of Payment in BTC for the whole project. The total amount of funding needs to be below $30k at the time of submission. (e.g. 0.80 BTC)

### Milestone 1 Example — Implement Substrate Modules
* **Estimated Duration:** 1 month
Expand Down

0 comments on commit 65b6141

Please sign in to comment.