From b5819480c7b0524fd9f46c980aa70e38932c9c72 Mon Sep 17 00:00:00 2001 From: Linda Date: Sat, 22 Aug 2020 10:51:12 -0700 Subject: [PATCH 01/11] Update pull_request_template.md --- .github/pull_request_template.md | 72 ++++++++++++++++++++++++++++++-- 1 file changed, 68 insertions(+), 4 deletions(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 9d2d8e73..4d425485 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1,7 +1,71 @@ -### Background/Context +## What type of PR is this? (check all applicable) -### Before and After +- [ ] ♻️ Refactor +- [ ] ✨ Feature (e.g. API change) +- [ ] 🐛 Bug Fix +- [ ] 🎨 Enhancement +- [ ] 📝 Documentation Update +- [ ] 🔖 Release +- [ ] 🚩 Other -### Acknowledgments (optional) +## Context -### Other notes (optional) +**_Placeholder example below:_** + +Closes Issue #128 + +Right now, on the front-end, we need to pass in a token (i.e. the user needs to be logged in) before they can see a list of resource. + +``` + axios + .get('/api/v1/resources', { + headers: { + Authorization: `Bearer ${authContext.authTokens.token}`, + }, + }) +``` + +This should be true for when users are creating a resource, but the list of resources on https://cb-react-concept.netlify.com/resources should be available to the public. + +## Other Related Tickets & Documents (as needed) + +**_Placeholder example:_** This relates to issue #23, and I also filed issue #43 as a next step to do after this PR is merged. + +## Implementation Details +What was your thought process as you changed the code? What does someone need to consider in reviewing it? + +Placeholder example: + +Placeholder example: +[x] Made GET /resources not protected by authorization +[x] Changed setup for tests to make sure we're not authed for the GET requests, but are authed for POST, PATCH, and search. +[x] Added test to make sure GET /api/v1/resources/{{guid}}/ and GET /api/v1/resources/ requests and search work without a token +[x] Altered tests for GET GET /api/v1/resources/{{guid}}/ and GET /api/v1/resources/ requests and search to ensure that they also work with a token +[x] Added tests to make sure PATCH and POST fail without a token +[x] Added test to make sure DEL fails without a token + +## Related Tickets & Documents (Optional) + +- [ ] I've updated `requirements.txt` + +List the new libraries here: + +## Any new migration files added? + +- [ ] 👍 yes +- [ ] 🙅 no, because they aren't needed + +## Did you add tests? +**_Code added or changed without test coverage or good reason for exemption won't be approved._** + +- [ ] 👍 yes +- [ ] 🙋 no, because I need help +- [ ] 🙅 no, because they aren't needed + +## Did you add documentation? + +- [ ] 📜 readme.md +- [ ] 📜 contributing.md +- [ ] 📜 wiki entry +- [ ] 🙋 I'd like someone to help write documentation, and will file a new issue for it +- [ ] 🙅 no documentation needed From eb8245031860c9d0d7c0b869d963b078bd4db5e8 Mon Sep 17 00:00:00 2001 From: Linda Date: Sun, 23 Aug 2020 17:16:41 -0700 Subject: [PATCH 02/11] Update .github/pull_request_template.md Whoa, this "commit suggestion" feature on GitHub is really nice! Co-authored-by: BethanyG --- .github/pull_request_template.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 4d425485..dee33fba 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -44,7 +44,7 @@ Placeholder example: [x] Added tests to make sure PATCH and POST fail without a token [x] Added test to make sure DEL fails without a token -## Related Tickets & Documents (Optional) +## New Libraries/Dependancies Introduced (Fill out as needed) - [ ] I've updated `requirements.txt` From ae672db81f0880b70453af582b170794dc982c34 Mon Sep 17 00:00:00 2001 From: Linda Date: Sun, 23 Aug 2020 17:16:57 -0700 Subject: [PATCH 03/11] Update .github/pull_request_template.md Co-authored-by: BethanyG --- .github/pull_request_template.md | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index dee33fba..0db61ee8 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -46,7 +46,6 @@ Placeholder example: ## New Libraries/Dependancies Introduced (Fill out as needed) -- [ ] I've updated `requirements.txt` List the new libraries here: From 71a56111bdc424e50172c188ab57b64f8327f596 Mon Sep 17 00:00:00 2001 From: Linda Date: Sun, 23 Aug 2020 17:18:59 -0700 Subject: [PATCH 04/11] Update .github/pull_request_template.md Co-authored-by: BethanyG --- .github/pull_request_template.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 0db61ee8..d593ab3f 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -47,7 +47,9 @@ Placeholder example: ## New Libraries/Dependancies Introduced (Fill out as needed) -List the new libraries here: +If you have added libraries or other dependancies, please list them (and links to their repos) below: + +- [ ] I've updated `requirements.txt` ## Any new migration files added? From 4d08c2ccadf64020be85e67342ef475329dc925e Mon Sep 17 00:00:00 2001 From: Linda Date: Tue, 25 Aug 2020 18:29:53 -0700 Subject: [PATCH 05/11] Update .github/pull_request_template.md Co-authored-by: BethanyG --- .github/pull_request_template.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index d593ab3f..fb4b7e49 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1,6 +1,11 @@ ## What type of PR is this? (check all applicable) +- [ ] 🐛 Bug Fix +- [ ] ✨ Feature (_**e.g.** API change, enhancement, addition, etc._) - [ ] ♻️ Refactor +- [ ] 📝 Documentation +- [ ] 🔖 Release +- [ ] 🚩 Other (**concerning:** ) - [ ] ✨ Feature (e.g. API change) - [ ] 🐛 Bug Fix - [ ] 🎨 Enhancement From 7513d5f399a65852a9f03070b5a24b055c7af01b Mon Sep 17 00:00:00 2001 From: Linda Date: Tue, 25 Aug 2020 18:30:01 -0700 Subject: [PATCH 06/11] Update .github/pull_request_template.md Co-authored-by: BethanyG --- .github/pull_request_template.md | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index fb4b7e49..3a615dae 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -6,7 +6,6 @@ - [ ] 📝 Documentation - [ ] 🔖 Release - [ ] 🚩 Other (**concerning:** ) -- [ ] ✨ Feature (e.g. API change) - [ ] 🐛 Bug Fix - [ ] 🎨 Enhancement - [ ] 📝 Documentation Update From 96a00bac808726634c2f1ac3e80b92ca600789e4 Mon Sep 17 00:00:00 2001 From: Linda Date: Tue, 25 Aug 2020 18:30:10 -0700 Subject: [PATCH 07/11] Update .github/pull_request_template.md Co-authored-by: BethanyG --- .github/pull_request_template.md | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 3a615dae..4d61a304 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -6,7 +6,6 @@ - [ ] 📝 Documentation - [ ] 🔖 Release - [ ] 🚩 Other (**concerning:** ) -- [ ] 🐛 Bug Fix - [ ] 🎨 Enhancement - [ ] 📝 Documentation Update - [ ] 🔖 Release From 2bbbce8ec95210ddab6cea9ab9d45417a9a9643a Mon Sep 17 00:00:00 2001 From: Linda Date: Tue, 25 Aug 2020 18:30:20 -0700 Subject: [PATCH 08/11] Update .github/pull_request_template.md Co-authored-by: BethanyG --- .github/pull_request_template.md | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 4d61a304..afa11fd5 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -6,7 +6,6 @@ - [ ] 📝 Documentation - [ ] 🔖 Release - [ ] 🚩 Other (**concerning:** ) -- [ ] 🎨 Enhancement - [ ] 📝 Documentation Update - [ ] 🔖 Release - [ ] 🚩 Other From b65c256fa3f73e3205871dcdaf0a6cf1601a9d4a Mon Sep 17 00:00:00 2001 From: Linda Date: Tue, 25 Aug 2020 18:30:32 -0700 Subject: [PATCH 09/11] Update .github/pull_request_template.md Co-authored-by: BethanyG --- .github/pull_request_template.md | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index afa11fd5..e6a21f52 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -6,7 +6,6 @@ - [ ] 📝 Documentation - [ ] 🔖 Release - [ ] 🚩 Other (**concerning:** ) -- [ ] 📝 Documentation Update - [ ] 🔖 Release - [ ] 🚩 Other From e24ddde15086451075d5bbd0863b189b2644b937 Mon Sep 17 00:00:00 2001 From: Linda Date: Tue, 25 Aug 2020 18:30:40 -0700 Subject: [PATCH 10/11] Update .github/pull_request_template.md Co-authored-by: BethanyG --- .github/pull_request_template.md | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index e6a21f52..3be17d45 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -6,7 +6,6 @@ - [ ] 📝 Documentation - [ ] 🔖 Release - [ ] 🚩 Other (**concerning:** ) -- [ ] 🔖 Release - [ ] 🚩 Other ## Context From 598f15c745e1bcf917f926f212bf2b6cad852000 Mon Sep 17 00:00:00 2001 From: Linda Date: Tue, 25 Aug 2020 18:30:49 -0700 Subject: [PATCH 11/11] Update .github/pull_request_template.md Co-authored-by: BethanyG --- .github/pull_request_template.md | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 3be17d45..1e367a75 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -6,7 +6,6 @@ - [ ] 📝 Documentation - [ ] 🔖 Release - [ ] 🚩 Other (**concerning:** ) -- [ ] 🚩 Other ## Context