Skip to content

Commit

Permalink
Voting action and instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
mikepsinn committed Dec 26, 2021
1 parent f872791 commit dd11693
Show file tree
Hide file tree
Showing 8 changed files with 158 additions and 0 deletions.
81 changes: 81 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
# Common settings that generally should always be used with your language specific settings

# Auto detect text files and perform LF normalization
* text=auto

#
# The above will handle all files NOT found below
#

# Documents
*.bibtex text diff=bibtex
*.doc diff=astextplain
*.DOC diff=astextplain
*.docx diff=astextplain
*.DOCX diff=astextplain
*.dot diff=astextplain
*.DOT diff=astextplain
*.pdf diff=astextplain
*.PDF diff=astextplain
*.rtf diff=astextplain
*.RTF diff=astextplain
*.md text diff=markdown
*.tex text diff=tex
*.adoc text
*.textile text
*.mustache text
*.csv text
*.tab text
*.tsv text
*.txt text
*.sql text

# Graphics
*.png binary
*.jpg binary
*.jpeg binary
*.gif binary
*.tif binary
*.tiff binary
*.ico binary
# SVG treated as text by default.
*.svg text
# If you want to treat it as binary,
# use the following line instead.
# *.svg binary
*.eps binary

# Scripts
*.bash text eol=lf
*.fish text eol=lf
*.sh text eol=lf
*.zsh text eol=lf
# These are explicitly windows files and should use crlf
*.bat text eol=crlf
*.cmd text eol=crlf
*.ps1 text eol=crlf

# Serialisation
*.json text
*.toml text
*.xml text
*.yaml text
*.yml text

# Archives
*.7z binary
*.gz binary
*.tar binary
*.tgz binary
*.zip binary

# Text files where line endings should be preserved
*.patch -text

#
# Exclude files from exporting
#

.gitattributes export-ignore
.gitignore export-ignore
.gitkeep export-ignore
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.idea
7 changes: 7 additions & 0 deletions .voters.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
# To be added to the voter list, please introduce yourself in the Introductions channel on the Discussions page.
HermanntheGermann: 1
kevinperrott: 1
mikepsinn: 1
vincenzodomina: 1
viznov: 1
6 changes: 6 additions & 0 deletions .voting.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
percentageToApprove: 51 # Percentage of votes required to approve a merge
minVotersRequired: 1 # minimum number of unique voters needed to merge.
minVotingWindowMinutes: 720 # minimum amount of time that must pass after the pull request is updated before any
# vote can pass. 12 hours was selected because it allows at least 4 hours of review time after subtracting 8 hours
# for sleep.
Empty file removed 1-challenges/1.1-isolated-data.md
Empty file.
18 changes: 18 additions & 0 deletions voting.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
## Democratic Pull Requests

When a Pull Request is made to the main branch, a new comment is posted on the PR where you can click 👍 or 👎. When a Pull Request is updated, it will clear the voting and restart the vote.

### Rules of Voting

[.voting.yml](.voting.yml) contains the rules of voting:

- `percentageToApprove` is the percentage of up-votes needed to approve a merge.
- `minVotersRequired` is the minimum number of unique voters needed to merge.
- `minVotingWindowMinutes` is the minimum amount of time that must pass after the voting comment is created before any vote can pass. 12 hours was selected because it allows at least 4 hours of review time after subtracting 8 hours for sleep.

### Voters

[.voters.yml](.voters.yml) defines the allowed voters and their vote weights. Each entry has the format of
`<github-user>:<voting-weight>`. Each voter will be assigned a vote weight of 1 until and unless a weighting system is democratically approved.

To be added to the voter list, please introduce yourself in the Introductions channel on the Discussions page.
34 changes: 34 additions & 0 deletions workflows/drawio-export.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Keep draw.io export synchronized
on:
push:
branches:
- main
paths:
- "**.drawio"
- .github/workflows/drawio-export.yml
jobs:
drawio-export:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}

- name: Export drawio files to asciidoctor and png files
uses: rlespinasse/[email protected]
with:
format: adoc
output: drawio-assets
transparent: true

- name: Get author and committer info from HEAD commit
uses: rlespinasse/[email protected]

- name: Commit changed files
uses: stefanzweifel/[email protected]
with:
commit_message: "docs: sync draw.io exported files"
commit_user_name: "${{ env.GIT_COMMIT_COMMITTER_NAME }}"
commit_user_email: "${{ env.GIT_COMMIT_COMMITTER_EMAIL }}"
commit_author: "${{ env.GIT_COMMIT_AUTHOR }}"
11 changes: 11 additions & 0 deletions workflows/voting.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: 'Voting'
on:
pull_request_target:

jobs:
democracy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Evaluate vote
uses: myyk/git-democracy@v1

0 comments on commit dd11693

Please sign in to comment.