generated from antongolub/blank-ts
-
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
1d2674c
commit 3a2bd3d
Showing
1 changed file
with
13 additions
and
10 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 |
---|---|---|
|
@@ -13,22 +13,25 @@ It does not seem possible [to get commits info w/o repo cloning](https://stackov | |
import {createTower} from 'tagtower' | ||
|
||
const tower = createTower({ | ||
url: 'https://<token>github.com/git/repo.git', | ||
branch: 'tagtower' | ||
url: 'https://<token>github.com/git/repo.git', | ||
branch: 'tagtower', | ||
temp: './temp', // A dir to hold temporary git channels. Defaults to fs.mkdtemp(path.join(os.tmpdir(), 'tempy-tagtower-')) | ||
committerName: 'Foo Bar', // Username and email to sign annotaged git tags | ||
committerEmail: '[email protected]' // Defaults to Semrel Extra Bot <[email protected]> | ||
}) | ||
|
||
const id: string = 'some@tag' | ||
const data: Record<string, any> = { | ||
hash: '3f9f0a88b411a8932bce289a3dd498d70a4dc96c', | ||
author: 'Anton Golub <[email protected]>', | ||
message: `feat: initial feat` | ||
hash: '3f9f0a88b411a8932bce289a3dd498d70a4dc96c', | ||
author: 'Anton Golub <[email protected]>', | ||
message: 'feat: initial feat' | ||
} | ||
|
||
await tower.create(id, data) // stores entry to the specified remote | ||
await tower.read(id) // returns found TEntry | null | ||
await tower.read() // if tag is empty, returns TEntry[] | ||
await tower.update(id, data) // just a shortcut for delete & create | ||
await tower.delete(id) // void | ||
await tower.create(id, data) // stores entry to the specified remote | ||
await tower.read(id) // returns found TEntry | null | ||
await tower.read() // if tag is empty, returns TEntry[] | ||
await tower.update(id, data) // just a shortcut for delete & create | ||
await tower.delete(id) // void | ||
``` | ||
|
||
## License | ||
|