From 673c640cff667e39c3e23a4be0ea0d1a413b3f59 Mon Sep 17 00:00:00 2001 From: Ieuan Walker Date: Wed, 2 Jul 2025 15:57:49 +0100 Subject: [PATCH 1/6] Update task name from CommitRangeReleaseNotes@1 to ReleaseNotes@2 in README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f04b01f..d3d3a24 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ The extension analyses Git commits in a specified range, looking for merge commi ### Basic Usage ```yaml -- task: CommitRangeReleaseNotes@1 +- task: ReleaseNotes@2 inputs: startCommit: 'v1.0.0' endCommit: 'HEAD' @@ -30,7 +30,7 @@ The extension analyses Git commits in a specified range, looking for merge commi ### With Custom Template ```yaml -- task: CommitRangeReleaseNotes@1 +- task: ReleaseNotes@2 inputs: startCommit: 'v1.0.0' endCommit: 'v1.1.0' From a12978785d5fc6176883ed13aaf322ff75e977f8 Mon Sep 17 00:00:00 2001 From: Ieuan Walker Date: Wed, 2 Jul 2025 16:01:49 +0100 Subject: [PATCH 2/6] Add lightbox functionality for images in release notes --- .../task/defaultTemplateHtml.hbs | 67 +++++++++++++++++++ .../task/dist/.taskkey | 2 +- 2 files changed, 68 insertions(+), 1 deletion(-) diff --git a/CommitRangeReleaseNotesTask/task/defaultTemplateHtml.hbs b/CommitRangeReleaseNotesTask/task/defaultTemplateHtml.hbs index 8c164db..e2467df 100644 --- a/CommitRangeReleaseNotesTask/task/defaultTemplateHtml.hbs +++ b/CommitRangeReleaseNotesTask/task/defaultTemplateHtml.hbs @@ -172,6 +172,36 @@ color: #005a9e; text-decoration: underline; } + + /* ...existing styles... */ + .lightbox-overlay { + display: none; + position: fixed; + z-index: 9999; + top: 0; left: 0; right: 0; bottom: 0; + background: rgba(0,0,0,0.85); + justify-content: center; + align-items: center; + cursor: zoom-out; + transition: opacity 0.2s; + } + .lightbox-overlay.open { + display: flex; + opacity: 1; + } + .lightbox-img { + max-width: 90vw; + max-height: 90vh; + box-shadow: 0 4px 32px rgba(44,62,80,0.25); + border-radius: 8px; + background: #fff; + padding: 8px; + animation: lightbox-in 0.2s; + } + @keyframes lightbox-in { + from { transform: scale(0.95); opacity: 0; } + to { transform: scale(1); opacity: 1; } + } @@ -313,6 +343,10 @@

No pull requests in this range.

{{/if}} + + + \ No newline at end of file diff --git a/CommitRangeReleaseNotesTask/task/dist/.taskkey b/CommitRangeReleaseNotesTask/task/dist/.taskkey index 641cb20..c566b2b 100644 --- a/CommitRangeReleaseNotesTask/task/dist/.taskkey +++ b/CommitRangeReleaseNotesTask/task/dist/.taskkey @@ -1 +1 @@ -c6d53e51-fa83-4638-8d47-045b443f15c9 \ No newline at end of file +6d1706ad-ed62-4235-bf74-db38a01c929c \ No newline at end of file From 5da7cb8f6b7e57c9559e6567808b85b823e56a37 Mon Sep 17 00:00:00 2001 From: Ieuan Walker Date: Wed, 2 Jul 2025 16:12:11 +0100 Subject: [PATCH 5/6] Enhance lightbox functionality: improve scroll handling and overlay behavior; update task key in .taskkey --- .../task/defaultTemplateHtml.hbs | 35 +++++++++++-------- .../task/dist/.taskkey | 2 +- 2 files changed, 21 insertions(+), 16 deletions(-) diff --git a/CommitRangeReleaseNotesTask/task/defaultTemplateHtml.hbs b/CommitRangeReleaseNotesTask/task/defaultTemplateHtml.hbs index 7b86cc6..e2e132b 100644 --- a/CommitRangeReleaseNotesTask/task/defaultTemplateHtml.hbs +++ b/CommitRangeReleaseNotesTask/task/defaultTemplateHtml.hbs @@ -201,6 +201,11 @@ } /* --- Lightbox Styles --- */ + html.lightbox-open, + body.lightbox-open { + overflow: hidden !important; + height: 100%; + } .lightbox-overlay { display: none; position: fixed; @@ -431,42 +436,42 @@ } document.addEventListener('DOMContentLoaded', function () { - // Lightbox for images in .desc-content using event delegation + let lastScrollY = 0; + document.body.addEventListener('click', function (e) { if (e.target.matches('.desc-content img')) { var overlay = document.getElementById('lightboxOverlay'); var overlayImg = document.getElementById('lightboxImg'); overlayImg.src = e.target.src; overlay.style.display = 'flex'; - document.body.style.overflow = 'hidden'; + lastScrollY = window.scrollY; // Store scroll position + document.body.classList.add('lightbox-open'); + document.documentElement.classList.add('lightbox-open'); setTimeout(function () { overlay.classList.add('open'); }, 10); } }); - // Close lightbox on overlay click or ESC - var overlay = document.getElementById('lightboxOverlay'); - overlay.addEventListener('click', function () { + function closeLightbox() { + var overlay = document.getElementById('lightboxOverlay'); overlay.classList.remove('open'); overlay.classList.add('fade-out'); setTimeout(function () { overlay.style.display = 'none'; overlay.classList.remove('fade-out'); document.getElementById('lightboxImg').src = ''; - document.body.style.overflow = ''; + document.body.classList.remove('lightbox-open'); + document.documentElement.classList.remove('lightbox-open'); + window.scrollTo(0, lastScrollY); // Restore scroll position }, 200); - }); + } + + var overlay = document.getElementById('lightboxOverlay'); + overlay.addEventListener('click', closeLightbox); document.addEventListener('keydown', function (e) { if (e.key === 'Escape' && overlay.classList.contains('open')) { - overlay.classList.remove('open'); - overlay.classList.add('fade-out'); - setTimeout(function () { - overlay.style.display = 'none'; - overlay.classList.remove('fade-out'); - document.getElementById('lightboxImg').src = ''; - document.body.style.overflow = ''; - }, 200); + closeLightbox(); } }); diff --git a/CommitRangeReleaseNotesTask/task/dist/.taskkey b/CommitRangeReleaseNotesTask/task/dist/.taskkey index c566b2b..f2e504f 100644 --- a/CommitRangeReleaseNotesTask/task/dist/.taskkey +++ b/CommitRangeReleaseNotesTask/task/dist/.taskkey @@ -1 +1 @@ -6d1706ad-ed62-4235-bf74-db38a01c929c \ No newline at end of file +0a83546e-bcb8-405e-a9dd-0aaf61928c17 \ No newline at end of file From 90ffbcb48d3a8f6aa2c5ebf63751e09b52c02eb8 Mon Sep 17 00:00:00 2001 From: Ieuan Walker Date: Wed, 2 Jul 2025 16:15:05 +0100 Subject: [PATCH 6/6] Refine README.md: clarify PR ID extraction process and separate output file parameters for markdown and HTML --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d3d3a24..213f589 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Release Notes Generator An Azure DevOps extension that generates release notes from commit ranges in Git repositories. This task analyses merge commits to extract pull request information and associated work items, creating comprehensive release notes with proper Azure DevOps links. -Only works with squash merges, as it operates based on the commit message. i.e it finds the PR ID from the commit message in the following format `Merged PR {id}: {title}`. It then uses Azure DevOps APIs to get the PR data and the attached work items. +Only works with squash merges, as it operates based on the commit message. It finds the PR ID from commit messages in the format: `Merged PR {id}: {title}`. ## Features - **Git-based**: Extract release notes directly from Git commit history @@ -45,7 +45,8 @@ The extension analyses Git commits in a specified range, looking for merge commi |-----------|-------------|----------|---------| | `startCommit` | Commit reference for the start of the range (exclusive). Can be a commit hash, git tag, or a ref like `HEAD` or `HEAD~xx` | ✅ | - | | `endCommit` | Commit reference for the end of the range (inclusive). Can be a commit hash, git tag, or a ref like `HEAD` or `HEAD~xx` | ✅ | `HEAD` | -| `outputFileMarkdown` and `outputFileHtml` | Path where generated release notes will be saved | ✅ | `$(Build.ArtifactStagingDirectory)/release-notes.html` and `$(Build.ArtifactStagingDirectory)/release-notes.html` | +| `outputFileMarkdown` | Path for markdown output | ✅ | `$(Build.ArtifactStagingDirectory)/release-notes.md` | +| `outputFileHtml` | Path for HTML output | ✅ | `$(Build.ArtifactStagingDirectory)/release-notes.html` | | `templateFileMarkdown` and `templateFileHtml` | Path to custom Handlebars template file | ❌ | Built-in template | ### Supported commit reference formats for `startCommit` and `endCommit`