Skip to content
This repository was archived by the owner on Jan 19, 2022. It is now read-only.

Commit e1abbef

Browse files
authored
New version with milestones support, new format (#4)
* New version with milestones support, new format * Fix exported data header * Fix API pages interaction * Fix README text * Fix null milestone error
1 parent a8f2c09 commit e1abbef

File tree

6 files changed

+30
-23
lines changed

6 files changed

+30
-23
lines changed

Importer.js

Lines changed: 10 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Importer.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Importer.ts

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export class Importer {
2727
Core.endGroup()
2828

2929
Core.startGroup("📑 Getting all Issues in repository...")
30-
var page = 0
30+
var page = 1
3131
var issuesData = []
3232
var issuesPage
3333
do {
@@ -88,10 +88,13 @@ export class Importer {
8888
value.state,
8989
value.pull_request ? "Pull Request" : "Issue",
9090
value.title,
91-
JSON.stringify(labels),
92-
JSON.stringify(assignees),
93-
value.created_at,
94-
value.closed_at,
91+
value.html_url,
92+
Object.keys(labels).map(k => labels[k]).join(", "),
93+
Object.keys(assignees).map(k => assignees[k]).join(", "),
94+
value.milestone?.title,
95+
value.milestone?.state,
96+
value.milestone?.due_on,
97+
value.milestone?.html_url,
9598
])
9699
}
97100
issueSheetsData.forEach(value => {
@@ -109,7 +112,7 @@ export class Importer {
109112
majorDimension: "ROWS",
110113
range: sheetName + "!A1:1",
111114
values: [
112-
["#", "Status", "Type", "Title", "Labels", "Assignees", "Created at", "Closed at"]
115+
["#", "Status", "Type", "Title", "URI", "Labels", "Assignees", "Milestone", "Status", "Deadline", "URI"]
113116
]
114117
}
115118
})

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# github-project-issue-to-sheets
2-
Wanna import your Issues info to Google Sheets?
2+
Do you want to import your Issues info into Google Sheets?
33

4-
Cause we want Repository dashboard, Burndown Chart and other analysis. Google Sheets is simplest way to build your custom dashboard!
4+
Sometimes we need Repository dashboard, Burndown Chart and other analytics. Google Sheets is the simplest way to build your custom dashboard!
55

66
## But how?
7-
It's pretty easy. But requires some steps:
7+
It's pretty easy. But it requires some steps:
88

99
### 1. Enable Google Sheets API
1010

@@ -25,7 +25,7 @@ More info: https://developers.google.com/identity/protocols/oauth2/service-accou
2525

2626
### 3. Create Google Sheets document
2727

28-
Then create new sheet for GitHub Issues data and add Google API Service Account email to your document with writer access.
28+
Then create new sheet for GitHub Issues data and add Google API Service Account email to your document with editor access
2929

3030
### 4. Add Action to your repository and provide input data
3131

@@ -35,9 +35,9 @@ name: github-project-issue-to-sheets
3535
# Controls when the action will run. Triggers the workflow on push or pull request
3636
# events but only for the master branch
3737
on:
38-
workflow_dispatch:
39-
issues:
40-
types: [opened, deleted, transferred, closed, reopened, assigned, unassigned, labeled, unlabeled]
38+
workflow_dispatch:
39+
issues:
40+
types: [opened, deleted, transferred, closed, reopened, assigned, unassigned, labeled, unlabeled]
4141

4242
jobs:
4343
github-project-issue-to-sheets:
@@ -61,6 +61,6 @@ More info: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-
6161
6262
More info: https://docs.github.com/en/free-pro-team@latest/actions/reference/encrypted-secrets
6363
64-
### 6. Look at the exported Issues data in yur Sheets document
64+
### 6. Look at the exported Issues data in your Sheets document
6565
6666
![](https://i.imgur.com/U2t3nmo.png)

dist/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "github-project-issue-to-sheets",
3-
"version": "1.0.0",
3+
"version": "2.0.0",
44
"description": "Wanna import your Issues info to Google Sheets?",
55
"main": "dist/index.js",
66
"scripts": {

0 commit comments

Comments
 (0)