Skip to content

Commit

Permalink
docs: mention git user config opts
Browse files Browse the repository at this point in the history
  • Loading branch information
antongolub committed Sep 22, 2023
1 parent 1d2674c commit 3a2bd3d
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3a2bd3d

Please sign in to comment.