release: add latest tag/build to status message
Created by: davejrt
Adds a note to the status message with the latest build number, as well as a link to the build.
Fixes https://github.com/sourcegraph/sourcegraph/issues/31742
Test plan
new function works with a local test as a separate function, as well as CI passing.
➜ release git:(main) ✗ yarn run release util:latest-tag
yarn run v1.22.17
$ ts-node --transpile-only ./src/main.ts util:latest-tag
{
name: 'v3.42.0',
zipball_url: 'https://api.github.com/repos/sourcegraph/sourcegraph/zipball/refs/tags/v3.42.0',
tarball_url: 'https://api.github.com/repos/sourcegraph/sourcegraph/tarball/refs/tags/v3.42.0',
commit: {
sha: '8cf5aa13c21715e357423932aaff8f2803840a30',
url: 'https://api.github.com/repos/sourcegraph/sourcegraph/commits/8cf5aa13c21715e357423932aaff8f2803840a30'
},
node_id: 'MDM6UmVmNDEyODg3MDg6cmVmcy90YWdzL3YzLjQyLjA='
}
✨ Done in 2.81s.
➜ release git:(main) ✗ yarn run release util:latest-tag
yarn run v1.22.17
$ ts-node --transpile-only ./src/main.ts util:latest-tag
v3.42.0