async function resolveGatsbyRelease(tag) {
  // git log -1 --format=%H gatsby-source-contentful@4.0.0
  let result = await execa(`git`, [`rev-list`, `-n`, `1`, tag])
  const hash = String(result.stdout)
  result = await execa(`git`, [`tag`, `--points-at`, hash])
  const gatsbyPackageTag = result.stdout
    .split(`\n`)
    .find(tag => tag.split(`@`)[0] === `gatsby`)

  if (gatsbyPackageTag) {
    const gatsbyPackageVersion = parse(tagToVersion(gatsbyPackageTag))
    return `${gatsbyPackageVersion.major}.${gatsbyPackageVersion.minor}`
  }
  return ``
}
E.g. resolveGatsbyRelease(`gatsby-plugin-emotion@6.11.0`) returns `3.11`
Useful to link release notes in the changelog