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).
To install it as an NPM package, you should use the following command:
npm i @rove-team/gitsheet
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 Project
to 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 Credentials
and chooseService account
. Then fill out the form and click on theCreate
button. - Click on
Done
and that's it. Your client-email is created. - Now in the
APIs & Services > Credentials
page, 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 key
and 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.
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:
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 ).
Any
means showing all issues with any milestone.None
means showing all issues without any milestone.
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
});