Skip to content

Commit c51e2e7

Browse files
committed
feat: Add fields
1 parent a3c17c0 commit c51e2e7

File tree

3 files changed

+14
-1
lines changed

3 files changed

+14
-1
lines changed

_plugins/process.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,14 @@ def self.parse_repo(fetched_repo)
99
# A class or struct was not practical so an ad hoc hash is used here.
1010
repo = {}
1111
repo['name'] = fetched_repo['name']
12+
repo['url'] = fetched_repo['url']
13+
repo['description'] = fetched_repo['description']
14+
1215
repo['created_at'] = fetched_repo['createdAt']
16+
repo['updated_at'] = fetched_repo['updatedAt']
17+
1318
repo['stars'] = fetched_repo['stargazers']['totalCount']
19+
repo['forks'] = fetched_repo['forkCount']
1420

1521
fetched_topics = fetched_repo['repositoryTopics']['nodes']
1622
# List of topic names.

_plugins/repos_with_topics.gql

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ query ReposWithTopics {
55
repositories(first: 100, ownerAffiliations: OWNER, privacy: PUBLIC, orderBy: { field: NAME, direction: ASC }) {
66
nodes {
77
name
8+
url
9+
description
810
# Dates
911
createdAt
1012
updatedAt

all_topics.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ layout: page
1010

1111
{% assign repos = topic[1] %}
1212
{% for repo in repos %}
13-
* Name: {{ repo[0] }} Stars: {{ repo[1].stars }} Created: {{ repo[1].created_at }}
13+
- [{{ repo[0] }}]({{ repo[1].url }})
14+
* Description: {{ repo[1].description }}
15+
* Stars: {{ repo[1].stars }}
16+
* Forks: {{ repo[1].forks }}
17+
* Updated: {{ repo[1].updated_at | date_to_string }}
18+
* Created: {{ repo[1].created_at | date_to_string }}
1419
{% endfor -%}
1520
{% endfor %}

0 commit comments

Comments
 (0)