-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #266 from yurnov/show_release_notes
Покращення UI: можливість відображення Release Notes
- Loading branch information
Showing
8 changed files
with
100 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -85,3 +85,4 @@ | |
with: | ||
name: updater.bin | ||
path: ${{ github.workspace }}/updater.bin | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
async function fetchReleaseNotes(version) { | ||
// Get the version from the input parameter if provided, otherwise from the HTML element's data attribute | ||
const releaseNotesElement = document.getElementById("release-notes"); | ||
version = version || releaseNotesElement.getAttribute("data-version"); | ||
|
||
// Construct the API URL dynamically using the version | ||
const apiUrl = `https://api.github.com/repos/J-A-A-M/ukraine_alarm_map/releases/tags/${version}`; | ||
|
||
try { | ||
const response = await fetch(apiUrl); | ||
|
||
if (!response.ok) { | ||
throw new Error(`Failed to fetch release notes: ${response.statusText}`); | ||
} | ||
|
||
const data = await response.json(); | ||
const releaseNotes = data.body; | ||
|
||
// Format the release notes using the https://github.com/markedjs/marked library and display them in the element | ||
releaseNotesElement.innerHTML = marked.parse(releaseNotes); | ||
|
||
} catch (error) { | ||
releaseNotesElement.textContent = `Error: ${error.message}`; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters