En liten verktøykasse for #team-sykmelding
- Du må ha Node.js installert, husk å bruk verktøy som nvm eller asdf for å håndtere versjoner.
- Du må ha bun.sh installert, dette kan installeres med curl (
curl -fsSL https://bun.sh/install | bash
)
Du må ha en .npmrc
fil på root i home-mappen din med følgende innhold:
@navikt:registry=https://npm.pkg.github.com
//npm.pkg.github.com/:_authToken=${NPM_AUTH_TOKEN}
Du må ha en PAT (Personal Access Token) for å kunne laste ned pakker fra Github Package Registry. Denne kan
du lage her. Du må gi den read:packages
scope, bruk PAT typen "classic"
Legg til denne i din ~/.bashrc
eller ~/.zshrc
fil:
export NPM_AUTH_TOKEN=<din token>
npm i -g @navikt/teamsykmelding-cli
Nå er du klar til å bruke tsm
!
doctor
- check that all tooling and such looks OKauth
- login to gcloudcommits
- get the last commits for every repo in the teamprs
- get all open pull requestsrepos
- get all reposbuilds
- checks all repos for failing builds (on main)git
- keep our repos in sync, ex: tsm git syncwork
- see what has happened the last week (or more)mock
- do stuff with the mockteam
- get all team memberssync-file
- sync a file across specified repossync-cmd
- execute a command across multiple repos and stage and commit the changesprimary-branch
- get misc repo metadatamob
- make a mob commitconfig
- set config for tsmupgrade
- update the clichangelog
- get the latest changes in tsm clianalytics
- get your own usage stats for tsm cliopen
- open command that opens a project in IntelliJ IDEAweb
- open web pagegh
- open github repo in browsersecret
- get secretkafka
- kafka cli for kafka stuffazure
- azure cli for azure stuffdocker
- docker stuff
Du kan også bruke tsmx
for å interaktivt bytte mellom team, dersom du har satt opp flere team med tsm config --team=<team>
.
tsm doctor
tsm prs --drafts
tsm builds
tsm commits
tsm commits --order=asc --limit=10
tsm repos --query='cat .yarnrc.yml'
Dette kommandolinje-verktøyet er skrevet i TypeScript og bruker bun.sh. For å kjøre det må du først bygge det:
bun install
Deretter kan du kjøre det med:
bun run src/index.ts