Skip to content

Commit

Permalink
address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
yangyansong-adbe committed Nov 10, 2023
1 parent 70e8c06 commit c1e2700
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .github/scripts/release_notes/android-release.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ async function fetchMavenArtifactInfo(groupId, capacity, timestampInMilliseconds

console.log(`request options: ${JSON.stringify(options)}`)

// TODO: condiser refactoring the code blow with libraries like axios.
return new Promise((resolve) => {
let reqGet = https.request(options, function (res) {
if (res.statusCode != 200) {
Expand Down Expand Up @@ -84,6 +85,7 @@ async function fetchAndroidReleaseInfo(token, groupId, timestampInMilliseconds,
console.log("fetchMavenArtifactInfo():")
console.log(array)
let releaseInfoArray = []
// TODO: refactoring the code below with Array.prototype.map()
for (let i = 0; i < array.length; i++) {
let artifactId = array[i].artifactId
let version = array[i].version
Expand Down
6 changes: 3 additions & 3 deletions .github/scripts/release_notes/update-release-notes.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ async function updateReleaseNotesPage(filePath, releaseInfoArray) {
// Read the contents of the markdown file.
let contentLines = fs.readFileSync(filePath, "utf8").toString().split("\n")
// Find the index of the release notes header.
let releaseNotesHeader = "# Release Notes"
let releaseNotesHeader = "# Release notes"
let releaseNotesHeaderIndex = contentLines.indexOf(releaseNotesHeader)
if (releaseNotesHeaderIndex == -1) {
console.error("Error: can't find the release notes header")
Expand Down Expand Up @@ -228,7 +228,7 @@ function hasLineStartWith(string, lineArray) {
return false
}

async function fetchNonAndoirdReleaseInfo(token, timestampInMilliseconds) {
async function fetchNonAndroidReleaseInfo(token, timestampInMilliseconds) {
let releaseInofArray = []
for (const repoName of repoNames) {
let releaseInfoList = await fetchReleaseInfo(token, "adobe", repoName)
Expand Down Expand Up @@ -318,7 +318,7 @@ function updateNonAndroidReleaseInfo(releaseInfo) {

async function fetchAllReleaseInfo(token, timestampInMilliseconds) {
let releaseInfoArray = []
let rawInfoArray = await fetchNonAndoirdReleaseInfo(token, timestampInMilliseconds)
let rawInfoArray = await fetchNonAndroidReleaseInfo(token, timestampInMilliseconds)

for (const releaseInfo of rawInfoArray) {
releaseInfoArray.push(updateNonAndroidReleaseInfo(releaseInfo))
Expand Down
1 change: 1 addition & 0 deletions .github/scripts/release_notes/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ function capitalizeFirstLetter(string) {
return string.charAt(0).toUpperCase() + string.slice(1);
}

// TODO: consider using dayjs to handle date format
function convertIOSDateToRleaseDateFormat(ios1086DateStr) {
const date = new Date(ios1086DateStr)
const month = date.getMonth()
Expand Down
2 changes: 1 addition & 1 deletion src/pages/home/release-notes/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Keywords:
- Release notes
---

# Release Notes
# Release notes

## October 31, 2023

Expand Down

0 comments on commit c1e2700

Please sign in to comment.