From cc00cb37d01124ad0f5cde7166c4255ef1d4ac42 Mon Sep 17 00:00:00 2001 From: Jon Andre Briones Date: Mon, 25 Aug 2025 10:01:04 -0700 Subject: [PATCH 1/2] refactor: update the PR template, issues template and workflow for `main` --- .../{approved-feature.md => approved_feature.md} | 0 .github/PULL_REQUEST_TEMPLATE/feature.md | 13 ------------- .../bug-fix.md => pull_request_template.md} | 14 ++++++++++---- .../{deploy-to-branch.yml => deploy-to-build.yml} | 7 +++---- 4 files changed, 13 insertions(+), 21 deletions(-) rename .github/ISSUE_TEMPLATE/{approved-feature.md => approved_feature.md} (100%) delete mode 100644 .github/PULL_REQUEST_TEMPLATE/feature.md rename .github/{PULL_REQUEST_TEMPLATE/bug-fix.md => pull_request_template.md} (59%) rename .github/workflows/{deploy-to-branch.yml => deploy-to-build.yml} (84%) diff --git a/.github/ISSUE_TEMPLATE/approved-feature.md b/.github/ISSUE_TEMPLATE/approved_feature.md similarity index 100% rename from .github/ISSUE_TEMPLATE/approved-feature.md rename to .github/ISSUE_TEMPLATE/approved_feature.md diff --git a/.github/PULL_REQUEST_TEMPLATE/feature.md b/.github/PULL_REQUEST_TEMPLATE/feature.md deleted file mode 100644 index 3e297845..00000000 --- a/.github/PULL_REQUEST_TEMPLATE/feature.md +++ /dev/null @@ -1,13 +0,0 @@ -Feature: -closes #123 - -Description: -Talk about what was added and who it's for. -e.g. Added an exam bank which ..., which is intended to be used for students in CMPT courses. - -Features: -* list -* of -* features -* e.g. Added a new tab in the activity: Exam bank -* e.g. Users can view old exams, by year, class and semester diff --git a/.github/PULL_REQUEST_TEMPLATE/bug-fix.md b/.github/pull_request_template.md similarity index 59% rename from .github/PULL_REQUEST_TEMPLATE/bug-fix.md rename to .github/pull_request_template.md index 29b9c093..3bff871f 100644 --- a/.github/PULL_REQUEST_TEMPLATE/bug-fix.md +++ b/.github/pull_request_template.md @@ -1,10 +1,10 @@ -Fix: closes # -Issue(s): -Describe what the bug was. +Description: +Describe what the bug was or what the feature is. e.g. On the README page, the typed in message "Computing Science Student Society" was wrapping on letters rather than words. +# FOR BUGS Root cause: Explain the root cause of the issue. e.g. Since the animation used GSAP's split by chars feature, each individual letter was its own inline-block, which means word wrapping wouldn't work since they were all separate divs. @@ -13,6 +13,12 @@ Fix: Describe your solution. e.g. Added reverted the letters back to a single div using `split.revert()` once the animation has completed. +# FOR FEATURES +Features: +* Create a list of features that were added +* These features should explain workflows for end user, how to access the feature, and any requirements the end user should know +* If you developed a new module/framework for developers, mention it here too + (optional) Future issues: -If you foresee your fix causing an issue in the future mention it here. +If you foresee your change causing an issue in the future then mention it here. If it's something we'll need to address then we can open another issue to address this one. diff --git a/.github/workflows/deploy-to-branch.yml b/.github/workflows/deploy-to-build.yml similarity index 84% rename from .github/workflows/deploy-to-branch.yml rename to .github/workflows/deploy-to-build.yml index 0abf2ed3..c1a93570 100644 --- a/.github/workflows/deploy-to-branch.yml +++ b/.github/workflows/deploy-to-build.yml @@ -20,10 +20,10 @@ jobs: with: node-version: '22.x' - run: npm ci - - run: npm run build --if-present + - run: npm run build - name: Preserve build output when moving branches - run: mv build ../build-tmp + run: mv dist/csss-ng-frontend/browser ../build-tmp - name: Switch to the build branch and clean it run: | @@ -37,14 +37,13 @@ jobs: run: | # Set up a dummy user and email for identification purposes cp -R ../build-tmp/* . - rm -f ./js/*.LICENSE.txt - name: Commit and push run: | git config --global user.name "${{ github.actor }}" git config --global user.email "${{ github.actor }}@user.noreply.github.com" git add . - git commit -m "Updating `build` with PR#${{ github.event.pull_request.number }}: ${{ github.event.pull_request.title }}" + git commit -m "${{ github.event.pull_request.title }}" git push origin build env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 6666227c07cf9ad5032733101dd0b810ed045498 Mon Sep 17 00:00:00 2001 From: Jon Andre Briones Date: Mon, 25 Aug 2025 10:07:14 -0700 Subject: [PATCH 2/2] chore: update the build script for main --- .github/workflows/deploy-to-build.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deploy-to-build.yml b/.github/workflows/deploy-to-build.yml index c1a93570..8edfa35f 100644 --- a/.github/workflows/deploy-to-build.yml +++ b/.github/workflows/deploy-to-build.yml @@ -23,23 +23,24 @@ jobs: - run: npm run build - name: Preserve build output when moving branches + # If this is not done then the build folder will be lost when we switch branches run: mv dist/csss-ng-frontend/browser ../build-tmp - name: Switch to the build branch and clean it run: | - # Based off the script `./scripts/deploy_to_branch.sh` - # The branch we are publishing to + # Get the latest on the branch that builds are held in and switch to it git fetch origin build git switch build + # Remove everything in order to copy everything over rm -rf * - name: Copy the built files over to the root directory and push to `build` run: | - # Set up a dummy user and email for identification purposes cp -R ../build-tmp/* . - name: Commit and push run: | + # Set up a dummy user and email for identification purposes git config --global user.name "${{ github.actor }}" git config --global user.email "${{ github.actor }}@user.noreply.github.com" git add .