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

Commit

Permalink
New version with milestones support, new format (#4)
Browse files Browse the repository at this point in the history
* New version with milestones support, new format

* Fix exported data header

* Fix API pages interaction

* Fix README text

* Fix null milestone error
  • Loading branch information
ViRGiL175 authored Nov 8, 2020
1 parent a8f2c09 commit e1abbef
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 23 deletions.
16 changes: 10 additions & 6 deletions Importer.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Importer.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 9 additions & 6 deletions Importer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export class Importer {
Core.endGroup()

Core.startGroup("📑 Getting all Issues in repository...")
var page = 0
var page = 1
var issuesData = []
var issuesPage
do {
Expand Down Expand Up @@ -88,10 +88,13 @@ export class Importer {
value.state,
value.pull_request ? "Pull Request" : "Issue",
value.title,
JSON.stringify(labels),
JSON.stringify(assignees),
value.created_at,
value.closed_at,
value.html_url,
Object.keys(labels).map(k => labels[k]).join(", "),
Object.keys(assignees).map(k => assignees[k]).join(", "),
value.milestone?.title,
value.milestone?.state,
value.milestone?.due_on,
value.milestone?.html_url,
])
}
issueSheetsData.forEach(value => {
Expand All @@ -109,7 +112,7 @@ export class Importer {
majorDimension: "ROWS",
range: sheetName + "!A1:1",
values: [
["#", "Status", "Type", "Title", "Labels", "Assignees", "Created at", "Closed at"]
["#", "Status", "Type", "Title", "URI", "Labels", "Assignees", "Milestone", "Status", "Deadline", "URI"]
]
}
})
Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# github-project-issue-to-sheets
Wanna import your Issues info to Google Sheets?
Do you want to import your Issues info into Google Sheets?

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

## But how?
It's pretty easy. But requires some steps:
It's pretty easy. But it requires some steps:

### 1. Enable Google Sheets API

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

### 3. Create Google Sheets document

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

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

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

jobs:
github-project-issue-to-sheets:
Expand All @@ -61,6 +61,6 @@ More info: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-
More info: https://docs.github.com/en/free-pro-team@latest/actions/reference/encrypted-secrets
### 6. Look at the exported Issues data in yur Sheets document
### 6. Look at the exported Issues data in your Sheets document
![](https://i.imgur.com/U2t3nmo.png)
2 changes: 1 addition & 1 deletion dist/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "github-project-issue-to-sheets",
"version": "1.0.0",
"version": "2.0.0",
"description": "Wanna import your Issues info to Google Sheets?",
"main": "dist/index.js",
"scripts": {
Expand Down

0 comments on commit e1abbef

Please sign in to comment.