Update script to clean up files
All checks were successful
Generate Release / validate_and_release (push) Successful in 20s

This commit is contained in:
Fred Boniface
2025-12-04 21:09:34 +00:00
parent ffb5e8c447
commit 1c3b77e937
2 changed files with 18 additions and 3 deletions

View File

@@ -32,4 +32,19 @@ jobs:
commit_message: Sort & Merge PIS Files
commit_user_name: owlbot
commit_user_email: owlbot@owlboard.info
commit_author: Robotic Owl <owlbot@owlboard.info>
commit_author: Robotic Owl <owlbot@owlboard.info>
- name: Create Pull Request
if: steps.commit.outputs.changes_detected == 'true'
uses: https://github.com/peter-evans/create-pull-request@v6
with:
base_url: https://git.fjla.uk
token: ${{ secrets.OWLBOT_TOKEN }}
commit-branch: sort-merge-${{ github.run_id }}
base: main
title: 'Automated PIS Update: Robotic Owl'
delete-branch: true
body: |
This pull request was automatically generated by the Robotic Owl.
It contains a consolidated and sorted PIS data file for review. Please inspect before merging.

View File

@@ -52,9 +52,9 @@ function sortAndMergeYAMLFiles() {
console.error("Error writing codes.yaml", err)
}
// Remove any files created by dgp2
// Remove any new files
files.forEach(file => {
if (file.startsWith('auto-')) {
if (file !== 'codes.yaml') {
fs.unlinkSync(directoryPath + file);
console.log(`Deleted file: ${file}`);
}