-
-
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.
1.1.0 + Auto Publish
- Loading branch information
Showing
10 changed files
with
215 additions
and
67 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created | ||
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages | ||
|
||
name: Node.js Package | ||
|
||
on: | ||
release: | ||
types: [created] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: 16 | ||
- run: npm ci | ||
- run: npm test | ||
|
||
publish-npm: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: 16 | ||
registry-url: https://registry.npmjs.org/ | ||
- run: npm ci | ||
- run: npm publish | ||
env: | ||
NODE_AUTH_TOKEN: ${{secrets.npm_token}} |
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 |
---|---|---|
@@ -0,0 +1,81 @@ | ||
<p align="center"><br> | ||
<a href="#"> | ||
<img src=".github/img/gitstorykit.png" height="128"> | ||
</a> | ||
</p> | ||
<center> | ||
<p align="center"> | ||
|
||
<img alt="GitHub" src="https://img.shields.io/github/license/swve/gitstorykit"> | ||
<img alt="GitHub contributors" src="https://img.shields.io/github/contributors/swve/gitstorykit"> | ||
<img alt="GitHub issues" src="https://img.shields.io/github/issues/swve/gitstorykit"> | ||
</p> | ||
</center> | ||
|
||
|
||
|
||
GitStoryKit is a little development kit that can be used to develop apps and software that enables git time travel, the library is in early development and is designed for simplicity. | ||
|
||
GitStoryKit is heavily used in GitStory | ||
|
||
The following Git clients are supported : | ||
- GitHub ✅ | ||
- Gitlab ⏳ (on development) | ||
- BitBucket ⏳ (on development) | ||
|
||
## Usage | ||
|
||
### Initialization | ||
|
||
```js | ||
import GitStory from "gitstorykit"; | ||
|
||
const gitstory = new GitStory("Github"); | ||
|
||
gitstory.init({ owner: "vercel", repo: "next.js", sha: "5.0" }); | ||
``` | ||
|
||
### Get first commit | ||
```js | ||
const firstcommit = await gitstory.getFirstCommit(); | ||
``` | ||
|
||
### Get first commit Date | ||
```js | ||
const firstcommitdate = await gitstory.getFirstCommitDate(); | ||
``` | ||
|
||
### Get a commit's Date | ||
Dates should be in the **ISO 8601 format** | ||
```js | ||
const commit_date = await gitstory.getCommitDate(commit_sha); | ||
``` | ||
|
||
### Get commit between dates | ||
|
||
Dates should be in the **ISO 8601 format** | ||
```js | ||
const commit = await gitstory.getCommitsBetweenDates(startDate, endDate, per_page: number, page: number); | ||
``` | ||
|
||
### Get commits until date | ||
|
||
Dates should be in the **ISO 8601 format** | ||
```js | ||
const commit = await gitstory.getCommitsUntilDate(date, per_page: number, page: number); | ||
``` | ||
|
||
### Get a repository active years | ||
```js | ||
const active_years = await gitstory.yearsActive(); | ||
``` | ||
|
||
|
||
|
||
## Contributing | ||
|
||
Please see our [contributing.md](/CONTRIBUTING.md). | ||
|
||
## Authors | ||
|
||
Badr B. ([@swve](https://github.com/swve)) |
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
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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
Oops, something went wrong.