Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .env.sample
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
#########################
# Configuration options #
#########################

# Repositories to highlight as a comma-delimited list.
# Example: aragon/aragon,aragon/aragon-apps,aragon/aragon-ui
TRACKED_REPOS=


########################
# Development settings #
########################

# Personal Github token, to avoid API throttling or to access private repos.
# Create a token with the `repo` scope at https://github.com/settings/tokens.
#
Expand Down
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ Dashboard for keeping track of Github pull requests across repos, users, and org

## Configuration

Tracked repos (and the user / organization headings) are configured via an environment variable.

- `TRACKED_REPOS`: A comma-delimited list of repositories to track and automatically fetch pull requests from. Example configuration: `'aragon/aragon,aragon/aragon-apps,aragon/aragon-ui'`


More documentation is available in [`env.sample`](./env.sample).

### Development

- `GITHUB_TOKEN`: Personal Github token ([create one with the `repo` scope](https://github.com/settings/tokens), to decrease API throttling and allow access of private repos during development. **NOT** meant for production usage.
Expand Down
5 changes: 5 additions & 0 deletions now.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,10 @@
"scope": "aragonone",
"github": {
"silent": true
},
"build": {
"env": {
"TRACKED_REPOS": "aragon/aragon, aragon/aragon-apps, aragon/aragon-ui, aragon/aragon.js, aragon/aragonOS, aragon/aragon-cli, aragon/aragon-court, aragon/buidler-plugin, aragon/court-dashboard, aragon/radspec, aragon/use-wallet, aragonone/court-backend, aragonone/notification-service"
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think there's a better way of doing this; we don't get multi-line strings in JSON :(.

}
}
}
1 change: 1 addition & 0 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ module.exports = {
replace({
'process.env.NODE_ENV': JSON.stringify('production'),
'process.env.GITHUB_TOKEN': JSON.stringify(process.env.GITHUB_TOKEN),
'process.env.TRACKED_REPOS': JSON.stringify(process.env.TRACKED_REPOS),
}),
],
}
9 changes: 1 addition & 8 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,7 @@ const GITHUB_API_HEADERS = {
authorization: GITHUB_TOKEN ? `token ${GITHUB_TOKEN}` : null
}

const REPOS = [
'aragon/aragon',
'aragon/aragon-apps',
'aragon/aragon-ui',
'aragon/aragon.js',
'aragon/aragonOS',
'aragon/aragon-cli',
]
const REPOS = process.env.TRACKED_REPOS.split(',').map(repo => repo.trim())

const GROUPS = [
[30, '😭'],
Expand Down