Skip to content

Commit

Permalink
ensure that ony the user defined as assignee on ceremnoy PR can finis…
Browse files Browse the repository at this point in the history
…h it, new art for contribute script
  • Loading branch information
lucasmenendez committed Nov 16, 2023
1 parent bcdbd79 commit 7b73a20
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/finish-ceremony.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
types: [ closed ]
jobs:
finish-ceremony:
if: ${{ github.event.pull_request.merged == false && github.actor == github.event.pull_request.user.login && contains(github.event.pull_request.labels.*.name, 'on-going-ceremony') && startsWith(github.event.pull_request.head.ref, 'ceremony/') }}
if: ${{ github.event.pull_request.merged == false && github.actor == github.event.pull_request.assignee.login && contains(github.event.pull_request.labels.*.name, 'on-going-ceremony') && startsWith(github.event.pull_request.head.ref, 'ceremony/') }}
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
Expand Down
53 changes: 50 additions & 3 deletions scripts/contribute
Original file line number Diff line number Diff line change
@@ -1,14 +1,60 @@
#!/bin/bash

intro_message() {
echo "
prompt_env_inputs() {
echo "Welcome to the zk-voceremony contribution process!
"
__ __ ______ ______ _______ ______ __ __ ______
| \ | \ / \ / \ | \ / \ | \ | \| \
| ## | ##| ######\| ######\| #######\| ######\| ##\ | ## \######
| ## | ##| ## | ##| ## \##| ## | ##| ## | ##| ###\| ## | ##
\##\ / ##| ## | ##| ## | ## | ##| ## | ##| ####\ ## | ##
\##\ ## | ## | ##| ## __ | ## | ##| ## | ##| ##\## ## | ##
\## ## | ##__/ ##| ##__/ \| ##__/ ##| ##__/ ##| ## \#### _| ##_
\### \## ## \## ##| ## ## \## ##| ## \###| ## \
\# \###### \###### \####### \###### \## \## \######
zk-SNARKs Anonymous Voting Trusted Setup Ceremony
,******,*,.
*********,,,,,,,,.
*//*********,,,,,,
//////**********,.
.,**///////////*******.
.*********(((////////////***,,,,,,.
.**************,*((((((((/////////*,,,,,,,,,,,,.
,********/////////////////((((((((//////,,,,,,,,,,,,.........
(/***************///////////*******//(((((/*,,,,,,,,,,,...........,
(#(((((/*,***********/..***/************,,,*,,,,,,,,,.......,,,,,,,
((##((((((((/*,,*********,,,,,,,,,,,,,,,,,,,,,,,,,...,******,***,,,
#(((((((((((((((((/*,,,,,,,,,,,,,,,,,,,,,,,,...,***********,,,,,,,,
#(((((((((((//((((((((///*,.,,,,,,,,,,...,***///**//*,,****,,,,,,,,
##((((((((((((((((//(((((//////*,..,**/////////************,,,,,,,,
##(((((((((((((((((((((///(((////*///////***/***************,,,,,,,
####(((((((((((((((((((//////////*/**//////////****************,,,,
######(((((((((((((((((/(////////*///////////////*****************,
(#######(((((((((((((((((////////*///////////////////*************,
(#########((((((((((((((((///////*//////////////////////**********,
/##########(((((((((((((((((/////*////////////////////////********.
/############(((((((((((((((((((/*/////////////////////////*******.
/%############((((((((((((((((((*//////////////////////////////.
*###########(((((((((((((((//(///((((((((//////////(/.
.########(((((((((((((/((((((((((((((((((((.
./#####((((((((((/(((((((((((((((.
*####((((((/((((((((((.
.###((/(((((.
*.
"
echo
echo "Welcome to the zk-voceremony contribution process!"
echo
echo "To start your contribution you need to provide the following information:"
echo " - Login to your GitHub account (commits will use your github username)"
echo " - The URL of the repository of the ceremony (by default 'https://github.com/vocdoni/zk-voceremony.git')"
echo " - The name of the ceremony (used to name the ceremony branch)"
}


prompt_env_inputs() {
GITHUB_REPO_URL="https://github.com/vocdoni/zk-voceremony.git"
read -p "Enter the url of the repo (by default 'https://github.com/vocdoni/zk-voceremony.git'): " REPO_URL
if [ -n "$REPO_URL" ]; then
Expand Down Expand Up @@ -125,6 +171,7 @@ publish_contribution() {
}

init_contribution() {
intro_message
prompt_env_inputs
check_contribute_env
make_contribution || error "contribution failed"
Expand Down

0 comments on commit 7b73a20

Please sign in to comment.