Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
95 commits
Select commit Hold shift + click to select a range
7535381
Create dependabot.yml
binon Feb 1, 2024
b4f4593
Update dependabot.yml
binon Feb 1, 2024
c56eab5
Update dependabot.yml
binon Feb 1, 2024
80cf007
Update dependabot.yml
binon Feb 1, 2024
6798c4f
Update dependabot.yml
binon Feb 1, 2024
bc20ace
Update dependabot.yml
binon Feb 1, 2024
f2e8c34
Delete .github/dependabot.yml
binon Feb 2, 2024
9411c2c
Create dependabot.yml
binon Feb 2, 2024
41e29d1
Update dependabot.yml
binon Feb 2, 2024
621dec7
Update dependabot.yml
binon Feb 2, 2024
0499546
Update dependabot.yml
binon Feb 2, 2024
848e934
Update dependabot.yml
binon Feb 2, 2024
5e852df
Update dependabot.yml
binon Feb 2, 2024
5e52ce0
Update dependabot.yml
binon Feb 2, 2024
96c0c6e
Update dependabot.yml
binon Feb 2, 2024
1453ce8
Update dependabot.yml
binon Feb 2, 2024
89bd157
Update dependabot.yml
binon Feb 2, 2024
8426011
Update dependabot.yml
binon Feb 5, 2024
0012e91
Delete .github/dependabot.yml
binon Feb 5, 2024
d81e1e0
Create dependabot.yml
binon Feb 5, 2024
b39d555
Update dependabot.yml
binon Feb 5, 2024
1a28f20
Update dependabot.yml
binon Feb 6, 2024
9e3d5c9
Update dependabot.yml
binon Feb 27, 2024
9535b06
Merge pull request #16 from TechnologyEnhancedLearning/RC
AnjuJose011 Feb 28, 2024
1396bb6
Merge pull request #18 from TechnologyEnhancedLearning/RC
AnjuJose011 Mar 6, 2024
fcc0d8b
Merge pull request #21 from TechnologyEnhancedLearning/RC
AnjuJose011 Mar 8, 2024
a3a84fa
Merge pull request #26 from TechnologyEnhancedLearning/RC
AnjuJose011 Apr 3, 2024
989b59b
Merge pull request #39 from TechnologyEnhancedLearning/RC
AnjuJose011 Jul 2, 2024
64aceba
Merge pull request #50 from TechnologyEnhancedLearning/RC
AnjuJose011 Sep 2, 2024
f7a3690
Update dependabot.yml
binon Sep 3, 2024
fd13d6d
Update dependabot.yml
binon Sep 3, 2024
1572a1b
Update continuous-integration-workflow.yml
binon Oct 8, 2024
70ae251
Update azure-pipelines-ci.yml
binon Oct 8, 2024
3ec58f6
Update continuous-integration-workflow.yml
binon Oct 8, 2024
b7cb8b4
conflicts resolved
AnjuJose011 Jan 16, 2025
903a3f2
Merge pull request #85 from TechnologyEnhancedLearning/mergercchanges…
AnjuJose011 Jan 16, 2025
30332bf
Create auto-merge.yml
binon Jan 17, 2025
52f6725
Bump node from 18.20.5 to 22.13.0 in /Auth/LearningHub.Nhs.Auth
dependabot[bot] Jan 17, 2025
25e0fa3
Merge pull request #87 from TechnologyEnhancedLearning/dependabot/npm…
binon Jan 17, 2025
06a42bd
Azure.Identity upgrade to test locally
binon Jan 17, 2025
5e73a41
Update dependabot.yml
binon Jan 20, 2025
f3d3e9d
Upgraded System.Data.SqlClient manually to fix the vulnarability. Dep…
binon Jan 20, 2025
53ee360
Merge branch 'Automatic_version_update_dependabot' of https://github.…
binon Jan 20, 2025
4470229
latest sql client
binon Jan 20, 2025
65ac396
updaing style cop manualy
binon Jan 20, 2025
cbb41dc
Some manual updates
binon Jan 21, 2025
9d0df31
Bump sass from 1.81.0 to 1.83.4 in /Auth/LearningHub.Nhs.Auth (#91)
dependabot[bot] Jan 21, 2025
a8750fe
Bump core-js from 3.39.0 to 3.40.0 in /Auth/LearningHub.Nhs.Auth (#90)
dependabot[bot] Jan 21, 2025
dd56154
Bump webpack from 5.96.1 to 5.97.1 in /Auth/LearningHub.Nhs.Auth (#89)
dependabot[bot] Jan 21, 2025
11b4a7f
Some manual updates
binon Jan 21, 2025
c3ce76d
Merge branch 'Automatic_version_update_dependabot' of https://github.…
binon Jan 21, 2025
5fb0794
Bump ts-loader from 9.5.1 to 9.5.2 in /Auth/LearningHub.Nhs.Auth (#92)
dependabot[bot] Jan 21, 2025
ba2d6d0
Update dependabot.yml
binon Jan 21, 2025
ca53d80
Update dependabot.yml
binon Jan 21, 2025
0796b1a
Update dependabot.yml
binon Jan 21, 2025
1ab4f65
Update dependabot.yml
binon Jan 21, 2025
71e2d06
Update dependabot.yml
binon Jan 21, 2025
7cf62c3
Update dependabot.yml
binon Jan 21, 2025
f5c6d81
Update dependabot.yml
binon Jan 21, 2025
9741cc7
Update dependabot.yml
binon Jan 21, 2025
921df0d
Update dependabot.yml
binon Jan 21, 2025
82c6800
Update dependabot.yml
binon Jan 21, 2025
d12c20f
Bump coverlet.collector from 3.1.2 to 6.0.4
dependabot[bot] Jan 21, 2025
fcf8679
Bump Swashbuckle.AspNetCore from 6.2.3 to 7.2.0
dependabot[bot] Jan 21, 2025
5fa0425
Bump Microsoft.ApplicationInsights.AspNetCore from 2.19.0 to 2.22.0 (…
dependabot[bot] Jan 21, 2025
86dca36
Bump xunit from 2.4.1 to 2.9.3 (#102)
dependabot[bot] Jan 21, 2025
4b98624
Bump Microsoft.TestPlatform.TestHost from 17.0.0 to 17.12.0
dependabot[bot] Jan 21, 2025
01b231c
Bump Microsoft.AspNetCore.Mvc.NewtonsoftJson from 6.0.0 to 6.0.36 (#97)
dependabot[bot] Jan 21, 2025
3c74c39
Bump xunit.runner.visualstudio from 2.4.3 to 3.0.1
dependabot[bot] Jan 21, 2025
7310762
Bump NLog.Web.AspNetCore from 4.14.0 to 5.3.15
dependabot[bot] Jan 21, 2025
5a05d7b
Merge pull request #93 from TechnologyEnhancedLearning/dependabot/nug…
binon Jan 21, 2025
60915f5
Merge pull request #95 from TechnologyEnhancedLearning/dependabot/nug…
binon Jan 21, 2025
84a7072
Merge pull request #99 from TechnologyEnhancedLearning/dependabot/nug…
binon Jan 21, 2025
2afdd79
Merge pull request #103 from TechnologyEnhancedLearning/dependabot/nu…
binon Jan 21, 2025
d83c250
Bump EntityFrameworkCore.Testing.Moq and Moq
dependabot[bot] Jan 21, 2025
8b4b44b
Merge pull request #98 from TechnologyEnhancedLearning/dependabot/nug…
binon Jan 21, 2025
c4bfa53
Merge pull request #100 from TechnologyEnhancedLearning/dependabot/nu…
binon Jan 21, 2025
b68708c
Bump node from 22.13.0 to 22.13.1 in /Auth/LearningHub.Nhs.Auth
dependabot[bot] Jan 22, 2025
8026578
Bump Microsoft.Extensions.Caching.Redis from 2.2.0 to 2.3.0 (#105)
dependabot[bot] Jan 22, 2025
a22c9b4
Bump Microsoft.EntityFrameworkCore from 6.0.0 to 7.0.20
dependabot[bot] Jan 22, 2025
17c7e48
Merge pull request #104 from TechnologyEnhancedLearning/dependabot/np…
binon Jan 22, 2025
583b3e6
Merge pull request #107 from TechnologyEnhancedLearning/dependabot/nu…
binon Jan 22, 2025
66bbf3e
Updated some package manually by solving dependencies
binon Jan 22, 2025
8d1882d
Bump MockQueryable.Core from 5.0.0 to 7.0.3
dependabot[bot] Jan 22, 2025
3d75f41
Bump Microsoft.EntityFrameworkCore and Microsoft.EntityFrameworkCore.…
dependabot[bot] Jan 22, 2025
07aba19
Merge pull request #109 from TechnologyEnhancedLearning/dependabot/nu…
binon Jan 22, 2025
0d87470
Update continuous-integration-workflow.yml
binon Jan 23, 2025
baa20f6
Update dependabot.yml
binon Jan 23, 2025
6da2339
Update continuous-integration-workflow.yml
binon Jan 23, 2025
43350f1
Merge pull request #108 from TechnologyEnhancedLearning/dependabot/nu…
binon Jan 23, 2025
d561639
Bump @babel/preset-env in /Auth/LearningHub.Nhs.Auth (#111)
dependabot[bot] Jan 27, 2025
f324863
Bump @babel/core from 7.26.0 to 7.26.7 in /Auth/LearningHub.Nhs.Auth …
dependabot[bot] Jan 27, 2025
c9e7f98
Bump sass from 1.83.4 to 1.84.0 in /Auth/LearningHub.Nhs.Auth (#113)
dependabot[bot] Feb 6, 2025
ed60102
Resolving conflics with .net 8 RC
binon Feb 6, 2025
c1aa239
Merge branch 'Automatic_version_update_dependabot' of https://github.…
binon Feb 6, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/azure-pipelines-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- task: NodeTool@0
displayName: Use Node 12.19
inputs:
versionSpec: 12.19
versionSpec: 14
- task: Npm@1
displayName: npm custom
inputs:
Expand Down
69 changes: 69 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
registries:
tel-azure-package-source:
type: nuget-feed
url: "https://pkgs.dev.azure.com/e-LfH/_packaging/LearningHubFeed/nuget/v3/index.json"
username: "kevin.whittaker"
password: ${{ secrets.AZURE_DEVOPS_PAT }}
nuget-package-source:
type: nuget-feed
url: "https://api.nuget.org/v3/index.json"
updates:
- package-ecosystem: "nuget"
directory: "/" # Location of package manifests
schedule:
interval: "daily"
open-pull-requests-limit: 10
registries:
- tel-azure-package-source
- nuget-package-source
target-branch: "Automatic_version_update_dependabot"
ignore:
# Ignore updates to packages that start with 'Wildcards'
- dependency-name: "elfhHub.Nhs.Models*"
- dependency-name: "LearningHub.Nhs.Models*"
- dependency-name: "LearningHub.Nhs.Caching*"
- dependency-name: "NHSUKViewComponents.Web*"
# Ignore some updates to the package
- dependency-name: "Microsoft.VisualStudio.Web.CodeGeneration.Design"
versions: [">7.0.0"]
- dependency-name: "Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation"
versions: [">7.0.0"]
- dependency-name: "Microsoft.AspNetCore.Mvc.Testing"
versions: [">7.0.0"]
- dependency-name: "Microsoft.AspNetCore.Authentication.JwtBearer"
versions: [">7.0.0"]
- dependency-name: "Microsoft.AspNetCore.Authentication.OpenIdConnect"
versions: [">7.0.0"]
- dependency-name: "Microsoft.AspNetCore.Mvc.NewtonsoftJson"
versions: [">7.0.0"]
- dependency-name: "Microsoft.EntityFrameworkCore"
versions: [">7.0.0"]
- dependency-name: "Microsoft.EntityFrameworkCore.SqlServer"
versions: [">7.0.0"]
- dependency-name: "Microsoft.Extensions.Caching.StackExchangeRedis"
versions: [">7.0.0"]
- dependency-name: "Microsoft.Extensions.Logging.Console"
versions: [">7.0.0"]
- dependency-name: "Selenium.WebDriver.ChromeDriver"
versions: ">=113.0.5672.1278" # Recommended version
# For all packages, ignore all patch updates
#- dependency-name: "*"
# update-types: ["version-update:semver-patch"]

# Configuration for npm Auth
- package-ecosystem: "npm"
directory: "Auth/LearningHub.Nhs.Auth/" # Location of package manifests
schedule:
interval: "daily"
target-branch: "Automatic_version_update_dependabot"
# - "dependencies"
open-pull-requests-limit: 10
ignore:
- dependency-name: "*"
update-types: ["version-update:semver-major"]
183 changes: 183 additions & 0 deletions .github/workflows/auto-merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,183 @@
name: Auto Merge Dependabot PRs

on:
pull_request:
types:
- opened
- synchronize

permissions:
pull-requests: write
contents: write

jobs:
auto-merge:
runs-on: ubuntu-latest
if: github.actor == 'dependabot[bot]'

steps:
- name: Checkout the repository
uses: actions/checkout@v3

- name: Set up GitHub CLI
run: |
# Install GitHub CLI (gh)
sudo apt-get update
sudo apt-get install gh

# Authenticate GitHub CLI using the provided token
echo ${{ secrets.GITHUB_TOKEN }} | gh auth login --with-token

- name: Wait for CI workflow to pass (Ensure CI workflow succeeded)
id: wait_for_ci
run: |
# Get the PR number from the GitHub event
PR_NUMBER=${{ github.event.pull_request.number }}
echo "Checking CI status for PR #$PR_NUMBER"

# Define the maximum wait time (in seconds) and the polling interval (in seconds)
MAX_WAIT_TIME=1800 # 30 minutes
POLL_INTERVAL=10 # Check every 10 seconds

# Initialize a timer
elapsed_time=0

# Poll CI status until all checks are completed
while true; do
# Fetch the status check rollup for the PR
CI_STATUS=$(gh pr view $PR_NUMBER --json statusCheckRollup)

# Log the fetched response
echo "CI Status Response: $CI_STATUS"

# Parse the checks and check their status
ALL_COMPLETED=true
ALL_CHECKS_PASSED=true

for check in $(echo "$CI_STATUS" | jq -r '.statusCheckRollup[] | @base64'); do
_jq() {
echo "${check}" | base64 --decode | jq -r "${1}"
}

status=$(_jq '.status')
conclusion=$(_jq '.conclusion')
check_name=$(_jq '.name')

# Log check details
echo "Check: $check_name, Status: $status, Conclusion: $conclusion"
if [[ "$check_name" == "auto-merge" ]]; then
echo "Skipping 'auto-merge' workflow check to prevent self-referencing."
continue
fi

# If any check is still queued, set ALL_COMPLETED to false
if [[ "$status" == "QUEUED" ]]; then
ALL_COMPLETED=false
fi

# If any check is still in progress, set ALL_COMPLETED to false
if [[ "$status" == "IN_PROGRESS" ]]; then
ALL_COMPLETED=false
fi

# If any completed check has failed, set ALL_CHECKS_PASSED to false
if [[ "$status" == "COMPLETED" && "$conclusion" != "SUCCESS" ]]; then
ALL_CHECKS_PASSED=false
fi
done

# Break the loop if all checks are completed
if [[ "$ALL_COMPLETED" == true ]]; then
break
fi

# Wait for the next polling interval
echo "Waiting for checks to complete... ($elapsed_time/$MAX_WAIT_TIME seconds elapsed)"
sleep $POLL_INTERVAL
elapsed_time=$((elapsed_time + POLL_INTERVAL))

# Exit if the maximum wait time is exceeded
if [[ "$elapsed_time" -ge "$MAX_WAIT_TIME" ]]; then
echo "Timed out waiting for CI checks to complete."
exit 1
fi
done

# Final check: Ensure all CI checks passed
if [[ "$ALL_CHECKS_PASSED" == false ]]; then
echo "One or more CI checks failed. Aborting merge."
exit 1
fi

echo "All CI checks passed successfully."


- name: Check Target Branch and PR Title
id: check_branch
run: |
PR_TITLE='${{ github.event.pull_request.title }}'
echo "Original PR Title: $PR_TITLE"

# Escape problematic quotes
ESCAPED_TITLE=$(echo "$PR_TITLE" | sed 's/"/\\"/g')
echo "Escaped PR Title: $ESCAPED_TITLE"

if [[ "$ESCAPED_TITLE" =~ ([0-9]+\.[0-9]+\.[0-9]+).*to.*([0-9]+\.[0-9]+\.[0-9]+) ]]; then
# Extract version numbers
OLD_VERSION="${BASH_REMATCH[1]}"
NEW_VERSION="${BASH_REMATCH[2]}"
echo "Version change detected: $OLD_VERSION to $NEW_VERSION"

# Split version into major, minor, patch components
OLD_MAJOR=$(echo "$OLD_VERSION" | cut -d '.' -f1)
OLD_MINOR=$(echo "$OLD_VERSION" | cut -d '.' -f2)
OLD_PATCH=$(echo "$OLD_VERSION" | cut -d '.' -f3)

NEW_MAJOR=$(echo "$NEW_VERSION" | cut -d '.' -f1)
NEW_MINOR=$(echo "$NEW_VERSION" | cut -d '.' -f2)
NEW_PATCH=$(echo "$NEW_VERSION" | cut -d '.' -f3)

# Check if it's a minor or patch update
if [[ "$OLD_MAJOR" == "$NEW_MAJOR" ]] && [[ "$OLD_MINOR" == "$NEW_MINOR" ]] && [[ "$NEW_PATCH" -gt "$OLD_PATCH" ]]; then
echo "Patch update detected"
echo "should_merge=true" >> $GITHUB_ENV
elif [[ "$OLD_MAJOR" == "$NEW_MAJOR" ]] && [[ "$NEW_MINOR" -gt "$OLD_MINOR" ]]; then
echo "Minor update detected"
echo "should_merge=true" >> $GITHUB_ENV
else
echo "No minor/patch update detected"
echo "should_merge=false" >> $GITHUB_ENV
fi
else
echo "No version change detected"
echo "should_merge=false" >> $GITHUB_ENV
fi

- name: Debug Context
uses: actions/github-script@v6
with:
script: |
console.log("Target branch:", context.payload.pull_request.base.ref);

- name: Check if Should Merge
run: |
echo "DEBUG: should_merge=${{ env.should_merge }}"
if [[ "${{ env.should_merge }}" == "true" ]] && [[ "${{ github.event.pull_request.base.ref }}" == "Automatic_version_update_dependabot" ]]; then
echo "DEBUG: should merge PR"
echo "should_merge=true" >> $GITHUB_ENV
else
echo "DEBUG: skip merge"
echo "should_merge=false" >> $GITHUB_ENV
fi

- name: Merge Pull Request
if: ${{ env.should_merge == 'true' }}
uses: actions/github-script@v6
with:
script: |
github.rest.pulls.merge({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: context.payload.pull_request.number,
merge_method: "squash"
});
84 changes: 68 additions & 16 deletions .github/workflows/continuous-integration-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,25 +43,77 @@ jobs:

- name: Build SQL Server Database project
run: |
# List all .sqlproj files except for .sqlproj
# Enable strict error handling
$ErrorActionPreference = 'Stop'

# Initialize an error collection
$errors = @()

# List all .sqlproj files
$sqlproj_files = Get-ChildItem -Path . -Filter *.sqlproj -Recurse

# Build each .csproj file
foreach ($sqlproj_file in $sqlproj_files) {
Write-Host "Building $($sqlproj_file.FullName)"
msbuild "$($sqlproj_file.FullName)" /p:Configuration=Release
}

- name: Build solution excluding SQL project

if ($sqlproj_files.Count -eq 0) {
$errors += "No .sqlproj files found."
} else {
foreach ($sqlproj_file in $sqlproj_files) {
Write-Host "Building $($sqlproj_file.FullName)"
try {
$output = &msbuild "$($sqlproj_file.FullName)" /p:Configuration=Release /nologo 2>&1
if (!$?) {
$errors += "Failed to build $($csproj_file.FullName): $output"
}
} catch {
# Capture detailed error information
$errorMessage = "Error building $($sqlproj_file.FullName): $($_.Exception.Message)"
Write-Host $errorMessage
$errors += $errorMessage
}
}
}

# Display all accumulated errors
if ($errors.Count -gt 0) {
Write-Host "SQL Project Build Errors:"
$errors | ForEach-Object { Write-Host $_ }
exit 1
}

- name: Build Solution Excluding SQL Project
run: |
# List all .csproj files except for .sqlproj
# Enable strict error handling
$ErrorActionPreference = 'Stop'

# Initialize an error collection
$errors = @()

# List all .csproj files except .sqlproj
$csproj_files = Get-ChildItem -Path . -Filter *.csproj -Recurse | Where-Object { $_.FullName -notmatch '\\.sqlproj$' }

# Build each .csproj file
foreach ($csproj_file in $csproj_files) {
Write-Host "Building $($csproj_file.FullName)"
dotnet build "$($csproj_file.FullName)"
}

if ($csproj_files.Count -eq 0) {
$errors += "No .csproj files found."
} else {
foreach ($csproj_file in $csproj_files) {
Write-Host "Building $($csproj_file.FullName)"
try {
$output = &dotnet build "$($csproj_file.FullName)" --configuration Release 2>&1
if (!$?) {
$errors += "Failed to build $($csproj_file.FullName): $output"
}
} catch {
# Capture detailed error information
$errorMessage = "Error building $($csproj_file.FullName): $($_.Exception.Message)"
Write-Host $errorMessage
$errors += $errorMessage
}
}
}

# Display all accumulated errors
if ($errors.Count -gt 0) {
Write-Host "Solution Build Errors:"
$errors | ForEach-Object { Write-Host $_ }
exit 1
}

#- name: Test
# run: dotnet test ${{ env.BuildParameters.TestProjects }}
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@
<ItemGroup>
<PackageReference Include="elfhHub.Nhs.Models" Version="3.0.8" />
<PackageReference Include="LearningHub.Nhs.Models" Version="3.0.33" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.0.0" />
<PackageReference Include="Microsoft.TestPlatform.TestHost" Version="17.0.0" />
<PackageReference Include="Moq" Version="4.16.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageReference Include="Microsoft.TestPlatform.TestHost" Version="17.12.0" />
<PackageReference Include="Moq" Version="4.20.72" />
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
<PackageReference Include="xunit" Version="2.9.3" />
<PackageReference Include="xunit.runner.visualstudio" Version="3.0.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
Loading
Loading