Migrate to fall 2025 #28
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
name: Comment on PRs to `main` | |
on: | |
pull_request: | |
types: [opened] | |
branches: | |
- main | |
jobs: | |
check-pr-branch: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check if PR branch does not start with 'dev' | |
run: | | |
if [[ ! "${{ github.head_ref }}" == dev* ]]; then | |
echo "branch_check_failed=true" >> $GITHUB_ENV | |
fi | |
- name: Check if PR branch does start with 'dev' | |
run: | | |
if [[ "${{ github.head_ref }}" == dev* ]]; then | |
echo "branch_check_failed=false" >> $GITHUB_ENV | |
fi | |
- name: Comment on PR if branch does not start with 'dev' | |
if: env.branch_check_failed == 'true' | |
run: | | |
curl -L \ | |
-X POST \ | |
-H "Accept: application/vnd.github+json" \ | |
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \ | |
-H "X-GitHub-Api-Version: 2022-11-28" \ | |
https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/comments \ | |
-d '{"body":"🚨 Hi @${{ github.actor }}, are you sure you want to merge directly into the `main` branch and not a development branch? Please check the box to confirm:\n- [ ] I, @${{ github.actor }}, confirm that `main` is the intended target branch of this pull request."}' | |
- name: Comment on PR if branch is a 'dev' branch | |
if: env.branch_check_failed == 'false' | |
run: | | |
curl -L \ | |
-X POST \ | |
-H "Accept: application/vnd.github+json" \ | |
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \ | |
-H "X-GitHub-Api-Version: 2022-11-28" \ | |
https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/comments \ | |
-d '{"body":"Before merging this `dev` branch to main, ensure the following items are complete:\n- [ ] Add changes to the Changelog and to #253\n- [ ] Check accessibility tooltip text for all components\n- [ ] Test usability on both Chrome and Firefox\n- [ ] Test usability on all screen sizes, including mobile\n- [ ] Stage all associated issues to be closed when this PR merges and label them with `waiting`"}' | |
- name: Comment core functionality checklist | |
run: | | |
curl -L \ | |
-X POST \ | |
-H "Accept: application/vnd.github+json" \ | |
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \ | |
-H "X-GitHub-Api-Version: 2022-11-28" \ | |
https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/comments \ | |
-d '{"body":"Test the core functionality of this PR by ensuring the user is able to:\n\n- [ ] Browse classes for all departments\n- [ ] View professor ratings on PlanetTerp from the course search\n- [ ] View class meeting locations on UMD Map from course search\n- [ ] Hover over classes on course search to see them on schedule\n- [ ] Add classes from any department to schedule\n- [ ] Remove courses from their schedule via course search\n- [ ] Remove courses from their schedule via schedule UI\n- [ ] Click on any course in schedule UI to view more information\n- [ ] View course on Testudo from course information panel\n- [ ] Remove course information panel from schedule UI\n- [ ] Toggle dark mode, and have dark mode preference save\n- [ ] Add several overlapping courses without any being hidden\n- [ ] Close the page and return to see the same courses saved\n- [ ] Add and switch between multiple schedules\n- [ ] Leave the page and return with all their saved schedules still there"}' |