Uploaded image for project: 'Hybrid Cloud Console'
  1. Hybrid Cloud Console
  2. RHCLOUD-27526

[changelog] Fetch information from github api

XMLWordPrintable

    • 5
    • False
    • Hide

      None

      Show
      None
    • False
    • Unset
    • No

      It looks like the jenkins job doesn't have the full information we need . The only commit info it is giving is the repo, branch, and commit ref. https://ci.ext.devshift.net/job/RedHatInsights-platform-changelog-go-test-gh-build-main/10/console

      Im thinking we are going to have to, after receiving this info, fetch the commit and pr related with the github api. This may require additional fields in the db to store said data.

      started looking at the api:

      Fetching PR relative to commit hash https://docs.github.com/en/rest/commits/commits?apiVersion=2022-11-28#list-pull-requests-associated-with-a-commit

      Fields that seem useful to me:

      • title (we were planning on storing by pr anyway)
      • url (to pull request)
      • user.login (which is the author)
      • created at
      • merged at
      • number (pr number)

      additional possible useful info about the repo

      • default_branch

      optional:

      • diff url
      • body
      • created at

      I dont think its needed, but we can also fetch the full commit info : https://docs.github.com/en/rest/commits/commits?apiVersion=2022-11-28#get-a-commit

              rh-ee-jorringe Justin Orringer
              rh-ee-jorringe Justin Orringer
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: