-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
95a2219
commit 247c516
Showing
2 changed files
with
58 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,10 @@ | ||
# Generate a personal access token (classic) on GitHub with an account that has read access to the repository | ||
# cf. https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token | ||
GITHUB_ACCESS_TOKEN= | ||
|
||
# Generate a Personal API Tokens on CircleCI with an account linked to the GitHub repository | ||
# cf. https://circleci.com/docs/managing-api-tokens | ||
CIRCLECI_ACCESS_TOKEN= | ||
|
||
# Specify the absolute path of the filename to output the list of event times. If not specified, the current directory is set. | ||
OUTPUT_DIR= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,54 @@ | ||
# depwatch | ||
|
||
depwatch is a simple command-line tool for collecting the times of various events in your project's lifecycle, from code commits to deployments. Event times are retrieved from repository management tools (like GitHub) and CI tools (like CircleCI). | ||
|
||
## Installation | ||
|
||
Install depwatch using pip: | ||
|
||
```shell-session | ||
$ pip install depwatch | ||
``` | ||
|
||
## Usage | ||
|
||
Execute the command with your access tokens. | ||
|
||
```shell-session | ||
GITHUB_ACCESS_TOKEN=<your_token> CIRCLECI_ACCESS_TOKEN=<your_token> depwatch <user_name>/<repository_name> | ||
``` | ||
|
||
The results are output to the output.csv file. | ||
|
||
```shell-session | ||
$ cat output.csv | ||
first_committed_at,merged_at,deployed_at | ||
2023-02-25T00:48:18+00:00,2023-02-25T00:57:06+00:00,2023-02-25T00:58:11+00:00 | ||
2023-02-25T00:46:52+00:00,2023-02-25T00:54:05+00:00,2023-02-25T00:55:12+00:00 | ||
2023-02-25T00:43:47+00:00,2023-02-25T00:45:33+00:00,2023-02-25T00:46:39+00:00 | ||
... | ||
``` | ||
|
||
### Note: Using the `.env` file | ||
|
||
Alternatively, you can use the `.env` file. Create the `.env` file in the directory where you want to run the command as follows. | ||
|
||
```shell-session | ||
cp .env.example .env | ||
``` | ||
|
||
Set the values according to the instructions in the `.env` file. | ||
|
||
### Note: Scope of the GitHub Personal Access Token | ||
|
||
GitHub offers [two types of personal access tokens](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token), fine-grained personal access tokens and classic personal access tokens. For personal repositories, you can use both. For organizatio repositories, we recommend using classic tokens, as we know that fine-grained tokens do not allow you to get private repositories. | ||
|
||
If you use fine-grained personal access tokens, specify read-only permissions for **Contents**, **Metadata**, and **Pull requests**. If you use classic personal access tokens, specify **repo** scope. | ||
|
||
## Contributing | ||
|
||
Comming soon! | ||
|
||
## License | ||
|
||
This code is released under the MIT License. See [LICENSE](/LICENSE) for details. |