Skip to content

Commit

Permalink
Initial template setup
Browse files Browse the repository at this point in the history
  • Loading branch information
Evalir committed Apr 17, 2020
0 parents commit eb2ee49
Show file tree
Hide file tree
Showing 35 changed files with 42,599 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"env": {
"browser": true,
"es6": true,
"jest": true
},
"plugins": [],
"extends": ["airbnb-base", "prettier"],
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
},
"parserOptions": {
"ecmaVersion": 2018,
"sourceType": "module"
},
"rules": {
"no-unused-vars": [
"error",
{
"vars": "local",
"args": "none"
}
],
"indent": ["error", 2],
"linebreak-style": ["error", "unix"],
"quotes": ["error", "single"],
"semi": "off",
"no-console": "off"
}
}
40 changes: 40 additions & 0 deletions .github/workflows/run_cli.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: "Run aragonCLI"

on:
# Trigger on merging to master.
push:
branches:
- master
# As well as every 6 hours.
schedule:
- cron: 0 */24 * * *

jobs:
build:
runs-on: "ubuntu-latest"

strategy:
matrix:
node-version: [12.x]

steps:
- uses: "actions/checkout@v2"
- name: "Use Node.js ${{ matrix.node-version }}"
uses: "actions/setup-node@v1"
with:
node-version: "${{ matrix.node-version }}"
INFURA_KEY: "${{ secrets.INFURA_KEY }}"
PRIVATE_KEY: "${{ secrets.PRIVATE_KEY }}"
- name: Setup aragonCLI signer
run: node ./src/setupAragon.js
env:
INFURA_KEY: "${{ secrets.INFURA_KEY }}"
PRIVATE_KEY: "${{ secrets.PRIVATE_KEY }}"
- name: Install Aracred
run: npm ci
- name: Install Aragon
run: npm install -g @aragon/cli
- name: Prepare transaction
run: node ./src/processGrain.js
- name: Sending Transaction
run: node ./src/mint.js | sh
42 changes: 42 additions & 0 deletions .github/workflows/run_sc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: "Run SourceCred"

on:
# Trigger on merging to master.
push:
branches:
- master
# As well as every 6 hours.
schedule:
- cron: 0 */6 * * *

jobs:
build:
runs-on: "ubuntu-latest"

strategy:
matrix:
node-version: [12.x]

steps:
- name: Checkout Repository
uses: actions/checkout@v1
- name: SourceCred Cache
uses: actions/cache@v1
with:
# cred-action uses *workspace*/sourcecred_data as it's SOURCECRED_DIRECTORY. Only store the cache from that.
path: sourcecred_data/cache
key: SC_CACHE-${{ hashFiles('**/project.json') }}-${{ github.run_id }}
restore-keys: |
SC_CACHE-${{ hashFiles('**/project.json') }}-
SC_CACHE-
- name: Run SourceCred
uses: vsoch/cred-action@wip-discord-cache
env:
token: ${{ secrets.GITHUB_TOKEN }}
SOURCECRED_DISCORD_TOKEN: ${{ secrets.SOURCECRED_DISCORD_TOKEN }}
with:
weights: ./config/weights.json
project: "@AraCred"
project-file: ./config/project.json
branch-against: master
automated: "true"
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
.vscode
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
log
docs
node_modules
10 changes: 10 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"printWidth": 80,
"semi": true,
"tabWidth": 2,
"singleQuote": true,
"trailingComma": "all",
"bracketSpacing": false,
"jsxBracketSameLine": false,
"proseWrap": "always"
}
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Aracred Template

This is the official, forkable Aracred template. Please see the [AraCred Deployment page](https://aracred.github.io/website/docs/deploymentOverview/) for info on how to setup and run AraCred.
2 changes: 2 additions & 0 deletions config/addressbook.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[
]
10 changes: 10 additions & 0 deletions config/dao.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[
{
"daoAddress": "",
"tokenManagerAddress": "",
"votingAddress": "",
"environment": "",
"mints": [],
"burns": []
}
]
20 changes: 20 additions & 0 deletions config/project.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[
{
"type": "sourcecred/project",
"version": "0.4.0"
},
{
"id": "",
"discord": {
"guildId": "",
"reactionWeights": {
"👍": 1,
"🔥": 1,
"❤️": 1,
"🙏": 1
}
},
"identities": [],
"repoIds": []
}
]
25 changes: 25 additions & 0 deletions config/weights.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
[
{
"type": "sourcecred/weights",
"version": "0.2.0"
},
{
"edgeWeights": {},
"nodeWeights": {
"N\u0000sourcecred\u0000github\u0000COMMENT\u0000": 0.5,
"N\u0000sourcecred\u0000github\u0000COMMIT\u0000": 1,
"N\u0000sourcecred\u0000github\u0000ISSUE\u0000": 1,
"N\u0000sourcecred\u0000github\u0000PULL\u0000": 16,
"N\u0000sourcecred\u0000github\u0000REPO\u0000": 4,
"N\u0000sourcecred\u0000github\u0000REVIEW\u0000": 4,
"N\u0000sourcecred\u0000discourse\u0000like\u0000": 4,
"N\u0000sourcecred\u0000discourse\u0000post\u0000": 0,
"N\u0000sourcecred\u0000discourse\u0000topic\u0000": 0,
"N\u0000sourcecred\u0000discourse\u0000user\u0000": 0,
"N\u0000sourcecred\u0000discord\u0000REACTION\u0000629411717704712192\u0000": 4,
"N\u0000sourcecred\u0000discord\u0000REACTION\u0000629412800346849302\u0000": 4,
"N\u0000sourcecred\u0000discord\u0000REACTION\u0000635151982298136587\u0000": 3,
"N\u0000sourcecred\u0000github": 2
}
}
]
1 change: 1 addition & 0 deletions docs/api/v1/data/projects/QEFyYUNyZWQ/cred.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[{"type":"sourcecred/pluginDeclarations","version":"0.1.0"},[{"edgePrefix":"E\u0000sourcecred\u0000github\u0000","edgeTypes":[{"backwardName":"is authored by","defaultWeight":{"backwards":1,"forwards":0.5},"description":"Connects a GitHub account to a post that they authored.\n\nExamples of posts include issues, pull requests, and comments.\n","forwardName":"authors","prefix":"E\u0000sourcecred\u0000github\u0000AUTHORS\u0000"},{"backwardName":"has child","defaultWeight":{"backwards":0.25,"forwards":1},"description":"Connects a GitHub entity to its child entities.\n\nFor example, a Repository has Issues and Pull Requests as children, and a\nPull Request has comments and reviews as children.\n","forwardName":"has parent","prefix":"E\u0000sourcecred\u0000github\u0000HAS_PARENT\u0000"},{"backwardName":"is merged by","defaultWeight":{"backwards":1,"forwards":0.5},"description":"Connects a GitHub pull request to the Git commit that it merges.\n","forwardName":"merges","prefix":"E\u0000sourcecred\u0000github\u0000MERGED_AS\u0000"},{"backwardName":"is referenced by","defaultWeight":{"backwards":0,"forwards":1},"description":"Connects a GitHub post to an entity that it references.\n\nFor example, if you write a GitHub issue comment that says \"thanks\n@username for pull #1337\", it will create references edges to both the user\n@username, and to pull #1337 in the same repository.\n","forwardName":"references","prefix":"E\u0000sourcecred\u0000github\u0000REFERENCES\u0000"},{"backwardName":"got 👍 from","defaultWeight":{"backwards":0,"forwards":1},"description":"Connects users to posts to which they gave a 👍 reaction.\n","forwardName":"reacted 👍 to","prefix":"E\u0000sourcecred\u0000github\u0000REACTS\u0000THUMBS_UP\u0000"},{"backwardName":"got ❤️ from","defaultWeight":{"backwards":0,"forwards":2},"description":"Connects users to posts to which they gave a ❤️ reaction.\n","forwardName":"reacted ❤️ to","prefix":"E\u0000sourcecred\u0000github\u0000REACTS\u0000HEART\u0000"},{"backwardName":"got 🎉 from","defaultWeight":{"backwards":0,"forwards":4},"description":"Connects users to posts to which they gave a 🎉 reaction.\n","forwardName":"reacted 🎉 to","prefix":"E\u0000sourcecred\u0000github\u0000REACTS\u0000HOORAY\u0000"},{"backwardName":"got 🚀 from","defaultWeight":{"backwards":0,"forwards":1},"description":"Connects users to posts to which they gave a 🚀 reaction.\n","forwardName":"reacted 🚀 to","prefix":"E\u0000sourcecred\u0000github\u0000REACTS\u0000ROCKET\u0000"},{"backwardName":"merged on GitHub as","defaultWeight":{"backwards":1,"forwards":1},"description":"Connects a commit on GitHub to the corresponding raw Git commit.\n","forwardName":"corresponds to Git commit","prefix":"E\u0000sourcecred\u0000github\u0000CORRESPONDS_TO_COMMIT_TYPE\u0000"}],"name":"GitHub","nodePrefix":"N\u0000sourcecred\u0000github\u0000","nodeTypes":[{"defaultWeight":4,"description":"NodeType for a GitHub repository","name":"Repository","pluralName":"Repositories","prefix":"N\u0000sourcecred\u0000github\u0000REPO\u0000"},{"defaultWeight":2,"description":"NodeType for a GitHub issue","name":"Issue","pluralName":"Issues","prefix":"N\u0000sourcecred\u0000github\u0000ISSUE\u0000"},{"defaultWeight":4,"description":"NodeType for a GitHub pull request","name":"Pull request","pluralName":"Pull requests","prefix":"N\u0000sourcecred\u0000github\u0000PULL\u0000"},{"defaultWeight":1,"description":"NodeType for a GitHub code review","name":"Pull request review","pluralName":"Pull request reviews","prefix":"N\u0000sourcecred\u0000github\u0000REVIEW\u0000"},{"defaultWeight":1,"description":"NodeType for a GitHub comment","name":"Comment","pluralName":"Comments","prefix":"N\u0000sourcecred\u0000github\u0000COMMENT\u0000"},{"defaultWeight":1,"description":"Represents a particular Git commit on GitHub, i.e. scoped to a particular repository","name":"Commit","pluralName":"Commits","prefix":"N\u0000sourcecred\u0000github\u0000COMMIT\u0000"},{"defaultWeight":0,"description":"NodeType for a GitHub user","name":"User","pluralName":"Users","prefix":"N\u0000sourcecred\u0000github\u0000USERLIKE\u0000USER\u0000"},{"defaultWeight":0,"description":"NodeType for a GitHub bot account","name":"Bot","pluralName":"Bots","prefix":"N\u0000sourcecred\u0000github\u0000USERLIKE\u0000BOT\u0000"}],"userTypes":[{"defaultWeight":0,"description":"NodeType for a GitHub user","name":"User","pluralName":"Users","prefix":"N\u0000sourcecred\u0000github\u0000USERLIKE\u0000USER\u0000"}]},{"edgePrefix":"E\u0000sourcecred\u0000discord\u0000","edgeTypes":[{"backwardName":"message is authored by","defaultWeight":{"backwards":1,"forwards":0.25},"description":"Connects an author to a message they've created.","forwardName":"authors message","prefix":"E\u0000sourcecred\u0000discord\u0000AUTHORS\u0000MESSAGE\u0000"},{"backwardName":"reaction added by","defaultWeight":{"backwards":0.0625,"forwards":1},"description":"Connects a member to a reaction that they added.","forwardName":"adds reaction","prefix":"E\u0000sourcecred\u0000discord\u0000ADDS_REACTION\u0000"},{"backwardName":"is reacted to by","defaultWeight":{"backwards":0.0625,"forwards":1},"description":"Connects a reaction to a message that it reacts to.","forwardName":"reacts to","prefix":"E\u0000sourcecred\u0000discord\u0000REACTS_TO\u0000"},{"backwardName":"is mentioned by","defaultWeight":{"backwards":0.0625,"forwards":1},"description":"Connects a message to the member being mentioned.","forwardName":"mentions","prefix":"E\u0000sourcecred\u0000discord\u0000MENTIONS\u0000"}],"name":"Discord","nodePrefix":"N\u0000sourcecred\u0000discord\u0000","nodeTypes":[{"defaultWeight":0,"description":"A member of the Discord server","name":"Member","pluralName":"Members","prefix":"N\u0000sourcecred\u0000discord\u0000MEMBER\u0000"},{"defaultWeight":0,"description":"A Discord message, posted in a particular channel","name":"Message","pluralName":"Messages","prefix":"N\u0000sourcecred\u0000discord\u0000MESSAGE\u0000"},{"defaultWeight":1,"description":"A reaction by some user, directed at some message","name":"Reaction","pluralName":"Reactions","prefix":"N\u0000sourcecred\u0000discord\u0000REACTION\u0000"}],"userTypes":[{"defaultWeight":0,"description":"A member of the Discord server","name":"Member","pluralName":"Members","prefix":"N\u0000sourcecred\u0000discord\u0000MEMBER\u0000"}]},{"edgePrefix":"E\u0000sourcecred\u0000identity\u0000","edgeTypes":[],"name":"Identity","nodePrefix":"N\u0000sourcecred\u0000identity\u0000","nodeTypes":[{"defaultWeight":0,"description":"A combined user identity as specified to SourceCred","name":"Identity","pluralName":"Identities","prefix":"N\u0000sourcecred\u0000identity\u0000"}],"userTypes":[{"defaultWeight":0,"description":"A combined user identity as specified to SourceCred","name":"Identity","pluralName":"Identities","prefix":"N\u0000sourcecred\u0000identity\u0000"}]}]]
1 change: 1 addition & 0 deletions docs/api/v1/data/projects/QEFyYUNyZWQ/project.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[{"type":"sourcecred/project","version":"0.4.0"},{"discord":{"guildId":"695344751490236486","reactionWeights":{"❤️":1,"👍":1,"💯":1,"🔥":1,"🙏":1}},"id":"@AraCred","identities":[{"aliases":["github/burrrata","discord/657069807505637397"],"username":"burrrata"},{"aliases":["github/pythonpete32","discord/571023281382227978"],"username":"Aaron"},{"aliases":["github/hammadj","discord/118260545211072517"],"username":"hammadj"},{"aliases":["github/decentralion","discord/420341518948237331"],"username":"dandelion"},{"aliases":["github/mzargham","discord/250086586450968576"],"username":"mzargham"},{"aliases":["github/lkngtn","discord/363774203960360961"],"username":"lkngtn"},{"aliases":["github/cslarson"],"username":"cslarson"},{"aliases":["github/0xgabi"],"username":"0xGabi"},{"aliases":["github/sembrestels"],"username":"sembrestels"},{"aliases":["github/fabriziovigevani"],"username":"fabriziovigevani"},{"aliases":["github/fioreb"],"username":"fioreb"},{"aliases":["github/onbjerg"],"username":"onbjerg"},{"aliases":["github/rperez89"],"username":"rperez"},{"aliases":["github/willjgriff"],"username":"willjgriff"},{"aliases":["github/luisivan"],"username":"li"},{"aliases":["github/evalir","discord/321092785921064961"],"username":"evalir"},{"aliases":["github/crisog","discord/474405294307278880"],"username":"crisorg"}],"repoIds":[{"name":"AraCred","owner":"aracred"},{"name":"website","owner":"aracred"},{"name":"bot","owner":"aracred"},{"name":"onboarding","owner":"aracred"},{"name":"TheSource","owner":"aracred"},{"name":"governance","owner":"aracred"},{"name":"comms","owner":"aracred"},{"name":"leaderboard","owner":"aracred"},{"name":"aracred-cli","owner":"aracred"}]}]
1 change: 1 addition & 0 deletions docs/api/v1/data/projects/QEFyYUNyZWQ/weightedGraph.json

Large diffs are not rendered by default.

14 changes: 14 additions & 0 deletions docs/asset-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"main.js": "static/js/main.e0361f59.js",
"main.js.map": "static/js/main.e0361f59.js.map",
"ssr.js": "static/js/ssr.da9aa522.js",
"ssr.js.map": "static/js/ssr.da9aa522.js.map",
"discord-invite/index.html": "discord-invite/index.html",
"favicon.png": "favicon.png",
"index.html": "index.html",
"prototype/@AraCred/index.html": "prototype/@AraCred/index.html",
"prototype/index.html": "prototype/index.html",
"test/FileUploader/index.html": "test/FileUploader/index.html",
"test/TimelineCredView/index.html": "test/TimelineCredView/index.html",
"timeline/@AraCred/index.html": "timeline/@AraCred/index.html"
}
Loading

0 comments on commit eb2ee49

Please sign in to comment.