Package Exports
- @rove-team/gitsheet
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@rove-team/gitsheet) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Git Sheet
Introduction
Gitsheet is a package to bring your git issues into a google spreadsheet. To take a quick looking at your issues' status or share it with your customer(s).
Installation
To install it as an NPM package, you should use the following command:
npm i @rove-team/gitsheetHow to create private key and client email
Before using this package, you need to create a google-client-email and a google-private-key. Use the following steps to make these two:
- Go to Google Cloud
- Click on
Create Projectto create a new project or use an already created one. - Then from the left-side panel, click on
APIs & Services > Credentials. - Next to the Google Cloud Platform text at the header navigation, make sure you are in the right project.
- Click on
Create Credentialsand chooseService account. Then fill out the form and click on theCreatebutton. - Click on
Doneand that's it. Your client-email is created. - Now in the
APIs & Services > Credentialspage, in the Service Accounts part, you can see your created client-email. Click on it. - On the opened page, click on
Add Key > Create new keyand choose the JSON format. - In the created JSON file, you can see your client-email and private-key.
- Don't forget to share your required spreadsheet documents with this created client-email.
- Also, you should Enable Google Sheet API for your google cloud account.
How to create GIT access token
Creating access tokens could be different in each GIT application. So you can see the following link to know how to make an access token for each one:
Create project information sheet
The next step is creating a new google spreadsheet for your project information. Also, you have to share it with your previously created google client-email.
The following headers with the same spell are required for your spreadsheet:
- Project Title This column is for your project title, which could be anything meaningful for yourself. This name does not have any impact on your results.
- Project ID In this column, you should write the project ID of your git repository.
- Sheet ID For each project, you should create a google spreadsheet and share it with your client email. Then put its ID in this column.
- Maximum Closed Show Days The number in this column is the maximum number of days that an issue had been closed. So the issues being closed for more days than this number would not be in the results.
- Show Milestone In this column, you should add a simple checkbox. Checking this checkbox will show the milestone column in the spreadsheet of this project.
- Milestone Title
If you want to get the issues of a specific milestone, you need to write its name in this column. Empty column means showing all issues ( with or without milestone ).
Anymeans showing all issues with any milestone.Nonemeans showing all issues without any milestone.
How to use
Now you can use this package easily. Just see the following example:
const gitSheet: GitSheet = new GitSheet({
gitBaseURL: 'your basic GIT URL based on you git application',
gitAccessToken: 'your personal git access token',
googleClientEmail: 'your google client email',
googlePrivateKey: 'your google private key',
});
gitSheet.start({
projectInformationSheetID: 'your project information spreadsheet ID',
cronJonTime: 'the cron format time', // the process will be repeat based on this time
});