diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index fedaa9be..85dd9fc1 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -10,9 +10,9 @@ on: jobs: deploy: - runs-on: ubuntu-18.04 + runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Setup Python uses: actions/setup-python@v2 diff --git a/README.md b/README.md index 93fd9259..0e6e7714 100644 --- a/README.md +++ b/README.md @@ -55,4 +55,6 @@ ZENHUB_TOKEN= \ poetry run python ./zcash-issue-dag.py ``` +You can find a series of template script files inside the folder `template_scripts`. + diff --git a/index.html b/index.html index 58957ac5..e1e0c091 100644 --- a/index.html +++ b/index.html @@ -20,4 +20,4 @@ - \ No newline at end of file + diff --git a/public/zcash-dag.css b/public/zcash-dag.css index 228f85bd..4df47224 100644 --- a/public/zcash-dag.css +++ b/public/zcash-dag.css @@ -3,6 +3,12 @@ /* Material dark theme surface colour */ fill: #121212; } + svg .cluster polygon { + stroke: #1976d2; + } + svg .cluster text { + fill: #c9d1d9; + } svg .node polygon { stroke: #c9d1d9; } @@ -14,6 +20,9 @@ /* Material Blue 700 */ fill: #1976d2; } + svg .node.needs-review polygon { + fill: #d29b19; + } svg .node.closed polygon { fill: #cf6b66; } diff --git a/template_scripts/generate_schemas.sh b/template_scripts/generate_schemas.sh new file mode 100644 index 00000000..6331749f --- /dev/null +++ b/template_scripts/generate_schemas.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash + +#GITHUB_TOKEN= \ +#ZENHUB_TOKEN= \ +poetry run python3 -m sgqlc.introspection \ + --exclude-deprecated \ + --exclude-description \ + -H "Authorization: bearer $GITHUB_TOKEN" \ + https://api.github.com/graphql \ + github_schema.json + +poetry run sgqlc-codegen schema github_schema.json github_schema.py diff --git a/template_scripts/generate_wallet_android_dag.sh b/template_scripts/generate_wallet_android_dag.sh new file mode 100644 index 00000000..5b3c9352 --- /dev/null +++ b/template_scripts/generate_wallet_android_dag.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + +DAG_VIEW=wallet-android \ +SHOW_MILESTONES=true \ +#GITHUB_TOKEN= \ +#ZENHUB_TOKEN= \ +poetry run python ./zcash-issue-dag.py diff --git a/template_scripts/generate_wallet_dag.sh b/template_scripts/generate_wallet_dag.sh new file mode 100644 index 00000000..9f95b65a --- /dev/null +++ b/template_scripts/generate_wallet_dag.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + +DAG_VIEW=wallet \ +SHOW_MILESTONES=true \ +#GITHUB_TOKEN= \ +#ZENHUB_TOKEN= \ +poetry run python ./zcash-issue-dag.py diff --git a/template_scripts/generate_wallet_ios_dag.sh b/template_scripts/generate_wallet_ios_dag.sh new file mode 100644 index 00000000..868f0e1d --- /dev/null +++ b/template_scripts/generate_wallet_ios_dag.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + +DAG_VIEW=wallet-ios \ +SHOW_MILESTONES=true \ +#GITHUB_TOKEN= \ +#ZENHUB_TOKEN= \ +poetry run python ./zcash-issue-dag.py diff --git a/zcash-issue-dag.py b/zcash-issue-dag.py index 743f5c6a..c1f79748 100755 --- a/zcash-issue-dag.py +++ b/zcash-issue-dag.py @@ -116,6 +116,7 @@ class GitHubIssue: self.title = data['title'] self.is_pr = 'merged' in data self.is_committed = 'S-committed' in labels + self.waiting_on_review = 'S-waiting-on-review' in labels self.url = data['url'] self.state = 'closed' if data['state'] in ['CLOSED', 'MERGED'] else 'open' if 'milestone' in data and data['milestone']: @@ -327,6 +328,9 @@ def main(): if n.state == 'closed': attrs['class'] = 'closed' attrs['fillcolor'] = '#fad8c7' + elif n.waiting_on_review: + attrs['class'] = 'needs-review' + attrs['fillcolor'] = '#dfc150' elif n.is_committed: attrs['class'] = 'committed' attrs['fillcolor'] = '#a6cfff' @@ -345,20 +349,23 @@ def main(): ag = nx.nx_agraph.to_agraph(dg) + clusters = 0 if SHOW_MILESTONES: # Identify milestone nbunches milestones = {n.milestone: [] for n in dg} for m in milestones: milestones[m] = [n for n in dg if n.milestone == m] del milestones[None] - for (i, (milestone, nodes)) in enumerate(milestones.items()): - ag.add_subgraph(nodes, 'cluster_%d' % i, label=milestone, color='blue') + for (milestone, nodes) in milestones.items(): + ag.add_subgraph(nodes, 'cluster_%d' % clusters, label=milestone, color='blue') + clusters += 1 if SHOW_EPICS: - for (i, (epic, issues)) in enumerate(issues_by_epic.items()): + for (epic, issues) in issues_by_epic.items(): issues = [n for n in dg if (n.repo_id, n.issue_number) in issues] if issues: - ag.add_subgraph(issues, 'cluster_%d' % i, label=epic.title, color='blue') + ag.add_subgraph(issues, 'cluster_%d' % clusters, label=epic.title, color='blue') + clusters += 1 # Draw the result! ag.graph_attr['rankdir'] = 'LR'