Skip to content

Commit

Permalink
updated with knowledge on promises and await and async
Browse files Browse the repository at this point in the history
  • Loading branch information
ldraney committed May 8, 2024
1 parent a7677f1 commit 88afbbf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/scripts/prData.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @param {string} owner - The owner of the GitHub repository.
* @param {string} repo - The repository name.
* @param {string} sha - The commit SHA.
* @returns {Promise<Object>} - A promise resolving to the list of pull requests.
* @returns {list} - A list of pull requests
*/
async function fetchPullRequests(github, owner, repo, sha) {
return await github.rest.repos.listPullRequestsAssociatedWithCommit({
Expand All @@ -21,7 +21,7 @@ async function fetchPullRequests(github, owner, repo, sha) {
* @param {Object} github - The GitHub client instance.
* @param {string} owner - The owner of the GitHub repository.
* @param {string} repo - The repository name.
* @returns {Promise<string>} - A promise resolving to the current release version.
* @returns {string} - A string of the current release version.
*/
async function getReleaseVersionValue(github, owner, repo) {
const { data } = await github.rest.actions.getRepoVariable({
Expand All @@ -37,7 +37,7 @@ async function getReleaseVersionValue(github, owner, repo) {
* @param {Object} github - The GitHub client instance.
* @param {string} owner - The owner of the GitHub repository.
* @param {string} repo - The repository name.
* @returns {Promise<string>} - A promise resolving to the SHA of the latest commit on the release branch.
* @returns {string} - The SHA of the latest commit on the release branch.
*/
async function fetchReleaseBranchSha(github, owner, repo) {
const { data } = await github.rest.repos.getCommit({
Expand Down

0 comments on commit 88afbbf

Please sign in to comment.