From 5e9b89e60c4e48b2e3a47e53da6b24aae8bf8120 Mon Sep 17 00:00:00 2001 From: Kate Isaac <41767733+kweav@users.noreply.github.com> Date: Thu, 24 Oct 2024 16:44:52 -0400 Subject: [PATCH 1/8] add an issue template for adding a website to syncs --- .github/ISSUE_TEMPLATE/new-website-add-to-sync.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/new-website-add-to-sync.md diff --git a/.github/ISSUE_TEMPLATE/new-website-add-to-sync.md b/.github/ISSUE_TEMPLATE/new-website-add-to-sync.md new file mode 100644 index 0000000..6c0e8c4 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/new-website-add-to-sync.md @@ -0,0 +1,14 @@ +--- +name: Add your new website to syncs/OTTR updates +about: Provide information about your new website (which uses the OTTR Website template) so that we can enroll it in OTTR updates +title: '' +labels: '' +assignees: cansavvy + +--- + +## What is the name of your new repository? + + +## What username or organization is your new repository associated with? + From 06a2e406f0cc941fbaf3e107cb3d4d6f47c55fad Mon Sep 17 00:00:00 2001 From: Kate Isaac <41767733+kweav@users.noreply.github.com> Date: Thu, 24 Oct 2024 16:47:58 -0400 Subject: [PATCH 2/8] add an issue template for updating a website in syncs --- .../update-website-info-for-sync.md | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/update-website-info-for-sync.md diff --git a/.github/ISSUE_TEMPLATE/update-website-info-for-sync.md b/.github/ISSUE_TEMPLATE/update-website-info-for-sync.md new file mode 100644 index 0000000..c3ce3c6 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/update-website-info-for-sync.md @@ -0,0 +1,26 @@ +--- +name: Update your website's info for syncs/OTTR updates +about: Provide information about your moved/renamed website (which uses the OTTR Website template) so that it can continue to be enrolled in OTTR updates +title: '' +labels: '' +assignees: cansavvy + +--- + + + +## If the name of your repository was changed ... + +### What was the old name? + + +### What is the new name? + + +## If the repository was moved ... + +### What was the original username or organization your repository was associated with? + + +### What is the new username or organization your repository was associated with? + From 7f7b131abf53975196aed8e8e532904b887d0662 Mon Sep 17 00:00:00 2001 From: Kate Isaac <41767733+kweav@users.noreply.github.com> Date: Thu, 24 Oct 2024 16:52:18 -0400 Subject: [PATCH 3/8] template problem report --- .../website-template-problem-report.md | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/website-template-problem-report.md diff --git a/.github/ISSUE_TEMPLATE/website-template-problem-report.md b/.github/ISSUE_TEMPLATE/website-template-problem-report.md new file mode 100644 index 0000000..cfb9aad --- /dev/null +++ b/.github/ISSUE_TEMPLATE/website-template-problem-report.md @@ -0,0 +1,32 @@ +--- +name: Website Template Problem Report +about: Create a report to help improve the template and its documentation +title: Problem +labels: bug +assignees: cansavvy + +--- + +## Describe what is not working with the template or is unclear in the documentation + + +## Please link to the specific website repository you are working on + +## To Reproduce + + +## Expected behavior + + +## Github actions links + + +## Screenshots + + +## Additional context + From fa00e0034c6d3e4c6615a7c51d4f41b2950281e4 Mon Sep 17 00:00:00 2001 From: Kate Isaac <41767733+kweav@users.noreply.github.com> Date: Thu, 24 Oct 2024 16:54:21 -0400 Subject: [PATCH 4/8] template feature request --- .../website-template-feature-request.md | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/website-template-feature-request.md diff --git a/.github/ISSUE_TEMPLATE/website-template-feature-request.md b/.github/ISSUE_TEMPLATE/website-template-feature-request.md new file mode 100644 index 0000000..b8712ee --- /dev/null +++ b/.github/ISSUE_TEMPLATE/website-template-feature-request.md @@ -0,0 +1,20 @@ +--- +name: Website Template Feature Request +about: Suggest an idea for the website templates +title: '' +labels: '' +assignees: cansavvy + +--- + +## Is your feature request related to a problem? Please describe. + + +## Describe the solution you'd like + + +## Describe alternatives you've considered + + +## Additional context + From 4e559d3caf0c3d7064b0f68a69e88c50fd3f436b Mon Sep 17 00:00:00 2001 From: Kate Isaac <41767733+kweav@users.noreply.github.com> Date: Thu, 24 Oct 2024 17:04:47 -0400 Subject: [PATCH 5/8] pr template --- .../pull_request_template_general.md | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .github/PULL_REQUEST_TEMPLATE/pull_request_template_general.md diff --git a/.github/PULL_REQUEST_TEMPLATE/pull_request_template_general.md b/.github/PULL_REQUEST_TEMPLATE/pull_request_template_general.md new file mode 100644 index 0000000..0b4d926 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE/pull_request_template_general.md @@ -0,0 +1,47 @@ +--- +name: New Content or Feature +about: New Content or Feature Update +title: General Update +labels: '' +assignees: +--- + + + + +### Purpose/implementation Section + +#### What changes are being implemented in this Pull Request? + + + +#### What was your approach? + + + +#### What GitHub issue does your pull request address? + + + +### Tell potential reviewers what kind of feedback you are soliciting. + + + +### New Content Checklist + +- [ ] New content/page is in an Rmd file with [this kind of format and headers](https://github.com/jhudsl/OTTR_Template_Website/blob/main/editing.Rmd). + +- [ ] Website successfully re-renders and any new content files have been added to the `_site.yml` file. + +- [ ] [Spell check runs successfully](https://www.ottrproject.org/customize-robots.html#Spell_checking)). + +- [ ] Any newly necessary packages that are needed have been added to the [Dockerfile and image](https://www.ottrproject.org/customize-docker.html). + +- [ ] Images are in the [correct format for rendering](https://www.ottrproject.org/writing_content_courses.html#set-up-images). + +- [ ] Every new image has [alt text and is in a Google Slide](https://www.ottrproject.org/writing_content_courses.html#Accessibility). + +- [ ] Each slide is described in the notes of the slide so learners relying on a screen reader can access the content. See https://lastcallmedia.com/blog/accessible-comics for more guidance on this. + +- [ ] The color palette choices of the slide are contrasted in a way that is friendly to those with color vision deficiencies. +You can check this using [Color Oracle](https://colororacle.org/). From 1a1ba967e698e3b22ddc34ac42f014b0985efee8 Mon Sep 17 00:00:00 2001 From: Kate Isaac <41767733+kweav@users.noreply.github.com> Date: Thu, 24 Oct 2024 17:07:35 -0400 Subject: [PATCH 6/8] PR template if you fork for sync updates --- .github/PULL_REQUEST_TEMPLATE/add_to_sync_template.md | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 .github/PULL_REQUEST_TEMPLATE/add_to_sync_template.md diff --git a/.github/PULL_REQUEST_TEMPLATE/add_to_sync_template.md b/.github/PULL_REQUEST_TEMPLATE/add_to_sync_template.md new file mode 100644 index 0000000..b0196ee --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE/add_to_sync_template.md @@ -0,0 +1,9 @@ +--- +name: Add new repository to sync +about: Enroll your repository for OTTR updates +title: OTTR Updates Enrollment +labels: '' +assignees: cansavvy +--- + +Added __ repository to sync.yml in order to enroll in OTTR updates. From 5da93e86883c690599209ab7ad8734a3576b4d38 Mon Sep 17 00:00:00 2001 From: Kate Isaac <41767733+kweav@users.noreply.github.com> Date: Thu, 24 Oct 2024 17:14:19 -0400 Subject: [PATCH 7/8] website specific issue templates --- .github/ISSUE_TEMPLATE/website-content-add.md | 15 ++++++++++ .../ISSUE_TEMPLATE/website-problem-report.md | 28 +++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/website-content-add.md create mode 100644 .github/ISSUE_TEMPLATE/website-problem-report.md diff --git a/.github/ISSUE_TEMPLATE/website-content-add.md b/.github/ISSUE_TEMPLATE/website-content-add.md new file mode 100644 index 0000000..02bea08 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/website-content-add.md @@ -0,0 +1,15 @@ +--- +name: New content idea +about: Suggest an idea for the website +title: '' +labels: '' +assignees: + +--- + +## Describe the your scope of your content idea + + + +## Additional context or resources + diff --git a/.github/ISSUE_TEMPLATE/website-problem-report.md b/.github/ISSUE_TEMPLATE/website-problem-report.md new file mode 100644 index 0000000..b0b71f3 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/website-problem-report.md @@ -0,0 +1,28 @@ +--- +name: Website Problem Report +about: Create a report to help improve a website +title: [Problem] +labels: bug +assignees: + +--- + +## Describe what is not working with the website + + +## Steps to Reproduce + + +## Expected behavior + + +## Screenshots + + +## Additional context + From 79abeb8b2e3d8db138ae687cbf8549221db82821 Mon Sep 17 00:00:00 2001 From: Kate Isaac <41767733+kweav@users.noreply.github.com> Date: Wed, 6 Nov 2024 19:35:27 -0500 Subject: [PATCH 8/8] add file cleanup to filing issues workflow --- .github/workflows/file-automatic-issues.yml | 57 ++++++++++++++++++++- 1 file changed, 56 insertions(+), 1 deletion(-) diff --git a/.github/workflows/file-automatic-issues.yml b/.github/workflows/file-automatic-issues.yml index e24658d..e92ed7c 100644 --- a/.github/workflows/file-automatic-issues.yml +++ b/.github/workflows/file-automatic-issues.yml @@ -17,7 +17,62 @@ jobs: steps: - name: checkout repo uses: actions/checkout@v4 - + + - name: Login as github actions bot + run: | + git config --global --add safe.directory $GITHUB_WORKSPACE + git config --global user.name 'github-actions[bot]' + git config --global user.email 'github-actions[bot]@users.noreply.github.com' + + # Delete Template-specific files that aren't needed for new websites + # Cleanup Template-specific bits + - name: Cleanup + run: | + rm -rf \ + .github/workflows/file-automatic-issues.yml \ + .github/ISSUE_TEMPLATE/new-website-add-to-sync.md \ + .github/ISSUE_TEMPLATE/update-website-info-for-sync.md \ + .github/ISSUE_TEMPLATE/website-template-feature-request.md \ + .github/ISSUE_TEMPLATE/website-template-problem-report.md \ + .github/PULL_REQUEST_TEMPLATE/add_to_sync_template.md \ + .github/sync.yml \ + .github/workflows/send-updates.yml \ + .github/workflows/test-send-updates.yml \ + docs/*.html + + # Commit deleted files + - name: Commit deleted files + id: commit_it + run: | + git config --global --add safe.directory $GITHUB_WORKSPACE + git config --global user.name 'github-actions[bot]' + git config --global user.email 'github-actions[bot]@users.noreply.github.com' + git add . + git commit -m "Template cleanup" + pushed_it=true + git push || pushed_it=false + echo "pushed_it=$pushed_it" >> $GITHUB_OUTPUT + + # If main is already protected, then file a PR + - name: Create a PR with deleted files + if: steps.commit_it.outputs.pushed_it == 'false' + uses: peter-evans/create-pull-request@v3 + id: pr + with: + commit-message: Delete unnecessary files + signoff: false + branch: auto_copy_rendered_files + delete-branch: true + title: 'Automatic course set up' + body: | + ### Description: + This PR was initiated by the github actions. It helps set up this repository to be ready to create your website. + It deletes some remnant files you don't need for your website but were used when this was a template. + labels: | + automated + reviewers: $GITHUB_ACTOR + token: ${{secrets.GH_PAT}} + # Issue for what repository settings need to be set - name: New Course - Set Repository Settings uses: peter-evans/create-issue-from-file@v4