hackforla / website

Hack for LA's website
https://www.hackforla.org
GNU General Public License v2.0
300 stars 750 forks source link

Update Google Apps Script to generate wins data feed only on Change #4154

Open roslynwythe opened 1 year ago

roslynwythe commented 1 year ago

Dependency

Overview

As developers we need to modify the Apps Script in the Wins-form (Responses) spreadsheet so that a json feed is pushed to GitHub only after the data has changed, in order to eliminate the need to examine daily commits for changes.

Action Items

Setup

Suggested Solutions to Implement

Testing

After successful testing

dev lead:

Resources/Instructions

roslynwythe commented 1 year ago

@jdingeman I have described two alternative solutions to this issue. They can be found in the section "Solution to Implement" under Action Items. Please advise which approach you favor.

ExperimentsInHonesty commented 5 months ago

all the dependencies have been cleared, this issue needs to be reviewed and if it's good, add a ready for prioritization label.

github-actions[bot] commented 2 months ago

Hi @iancooperman, thank you for taking up this issue! Hfla appreciates you :)

Do let fellow developers know about your:- i. Availability: (When are you available to work on the issue/answer questions other programmers might have about your issue?) ii. ETA: (When do you expect this issue to be completed?)

You're awesome!

P.S. - You may not take up another issue until this issue gets merged (or closed). Thanks again :)

iancooperman commented 2 months ago

ETA for this entire issue: 7/3/2024. I think I could complete the setup steps by this coming Sunday, 6/9/2024. Availability this week: Tues-Fri 5pm-9pm, Sat 10am-9pm, Sun 10am-4pm.

ExperimentsInHonesty commented 2 months ago

@iancooperman I have moved this issue to the In Progress column for you. Please remember to do that in future when you assign an issue. Thanks!

iancooperman commented 2 months ago

Output of step 5.3 on gh-requests in Wins Google Apps Script Development Process:

git diff Code.js
warning: in the working copy of 'google-apps-scripts/gh-requests/Code.js', LF will be replaced by CRLF the next time Git touches it
diff --git a/google-apps-scripts/gh-requests/Code.js b/google-apps-scripts/gh-requests/Code.js
index 2c14f52a..edb0ea73 100644
--- a/google-apps-scripts/gh-requests/Code.js
+++ b/google-apps-scripts/gh-requests/Code.js
@@ -119,7 +119,8 @@ function setToken_() {
   }

   const doc = DocumentApp.openById(id);
-  documentProperties.setProperty('TOKEN', doc.getBody().getText())
+  documentProperties.setProperty('TOKEN', doc.getBody().getText());
+  console.log(documentProperties.getProperty(`TOKEN`))
 }

 // Uses base64 to decode an input

The only significant difference between the version of Code.js cloned from Google and the one from GitHub is the addition of one line of logging.

iancooperman commented 2 months ago

No such output for wins-form-respones.

git diff Code.js
iancooperman commented 3 weeks ago

Hi!. Still working on this! Life just got in the way. Hope to have this done by the end of next week at the latest.

github-actions[bot] commented 2 weeks ago

@iancooperman

Please add update using the below template (even if you have a pull request). Afterwards, remove the 'To Update !' label and add the 'Status: Updated' label.

  1. Progress: "What is the current status of your project? What have you completed and what is left to do?"
  2. Blockers: "Difficulties or errors encountered."
  3. Availability: "How much time will you have this week to work on this issue?"
  4. ETA: "When do you expect this issue to be completed?"
  5. Pictures (optional): "Add any pictures of the visual changes made to the site so far."

If you need help, be sure to either: 1) place your issue in the Questions/In Review column of the Project Board and ask for help at your next meeting, 2) put a "Status: Help Wanted" label on your issue and pull request, or 3) put up a request for assistance on the #hfla-site channel. Please note that including your questions in the issue comments- along with screenshots, if applicable- will help us to help you. Here and here are examples of well-formed questions.

You are receiving this comment because your last comment was before Tuesday, August 6, 2024 at 12:04 AM PST.

iancooperman commented 1 week ago

Successfully set up test environment and finally resolved authentication issues on my end. Just need to make the appropriate changes in both files. ETA: 8/17

iancooperman commented 2 days ago

Will need to implement a deeper comparison of the wins-form-responses and _wins.json than just comparing their lengths. ETA: 8/25