Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implemented check for changes in Wins-form (Responses) spreadsheet within Wins Data automation #7409

Merged

Conversation

iancooperman
Copy link
Member

@iancooperman iancooperman commented Sep 7, 2024

Fixes #4154

What changes did you make?

  • Added a check that compares the current content of _wins-data.json to that of Wins-form (Responses) to see if any changes have been made (e.g. new win, hiding of win, etc.)

Why did you make the changes (we will use this info to test)?

  • To halt the creation of unnecessary pull requests when no significant changes have been made
  • To eliminate the need to examine daily commits for changes

Screenshots of Proposed Changes To The Website (if any, please do not include screenshots of code changes)

  • No direct visual changes to the website

Copy link

github-actions bot commented Sep 7, 2024

Want to review this pull request? Take a look at this documentation for a step by step guide!


From your project repository, check out a new branch and test the changes.

git checkout -b iancooperman-update-gas-wins-data-on-change-4154 gh-pages
git pull https://github.com/iancooperman/hackforla-website.git update-gas-wins-data-on-change-4154

@github-actions github-actions bot added role: front end Tasks for front end developers role: back end/devOps Tasks for back-end developers Complexity: Medium P-Feature: Wins Page https://www.hackforla.org/wins/ Feature: Wiki ready for dev lead Issues that tech leads or merge team members need to follow up on size: 1pt Can be done in 4-6 hours labels Sep 7, 2024
google-apps-scripts/gh-requests/Code.js Dismissed Show resolved Hide resolved
google-apps-scripts/wins-form-responses/Code.js Dismissed Show dismissed Hide dismissed
@iancooperman
Copy link
Member Author

@roslynwythe roslynwythe self-requested a review September 9, 2024 07:58
Copy link
Member

@roslynwythe roslynwythe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @iancooperman for your work on this complex issue. On the first line of the PR, the issue number (after "Fixes") is incorrect, Please correct that so the PR will be linked correctly to the issue. Thank you.

@codyyjxn codyyjxn self-requested a review September 9, 2024 22:15
Copy link
Member

@codyyjxn codyyjxn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@iancooperman Thank you for taking on this issue. The branch name looks good only thing is that I am confused which issue you fixed please correct that if possible. Other than that everything seems to be concise.

@github-actions github-actions bot added Complexity: Large size: 2pt Can be done in 7-12 hours and removed role: front end Tasks for front end developers Complexity: Medium Feature: Wiki ready for dev lead Issues that tech leads or merge team members need to follow up on size: 1pt Can be done in 4-6 hours labels Sep 10, 2024
@iancooperman
Copy link
Member Author

iancooperman commented Sep 10, 2024

@codyyjxn There was a small typo in the linked issue number. Thanks for catching that. Let me know if anything else needs to be done.

codyyjxn
codyyjxn previously approved these changes Sep 12, 2024
Copy link
Member

@roslynwythe roslynwythe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @iancooperman I'm still testing but I need to ask you to update line 62

google-apps-scripts/gh-requests/Code.js Outdated Show resolved Hide resolved
Copy link
Member

@roslynwythe roslynwythe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @iancooperman so far the code looks great but
commit 003c436 includes changes to google-apps-scripts/gh-requests/Code.js, which we do not want included in the git repository.

console.log("Entry difference detected. Updating wins file...");
const writeResponse = ghrequests.updateWinsFile(keyValueFile, encodedKeyValueData, keyValueSha);
if (writeResponse === false) {
console.log('Ending script...')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please make the console log output message more descriptive

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@roslynwythe Just to confirm, you're saying to remove the changes to appscript.json, right? Your initial comment says Code.js but the commit you linked is to appscript.json.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@roslynwythe Just to confirm, you're saying to remove the changes to appscript.json, right? Your initial comment says Code.js but the commit you linked is to appscript.json.

I have assumed this is the case and reverted commit 003c436.

@iancooperman
Copy link
Member Author

@roslynwythe I would appreciate your rereview.

@t-will-gillis t-will-gillis self-requested a review October 13, 2024 17:07
@t-will-gillis
Copy link
Member

Hey @roslynwythe Do you have any additional comments on this PR? Please let us know-thanks!

Copy link
Member

@roslynwythe roslynwythe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job @iancooperman on this issue which involved an extensive setup and analysis to determine the best strategy to detect changes in the wins data

  • Code changes are clean and correct
  • PR is well-formed and descriptive
  • Changes have been tested in a test repository

To review this PR, I created a test environment in HfLA website Admin/HfLA website Admin/testing_PR_7409 and tested the PR against the production repository, in order to confirm that _wins-data.json is pushed to elizabethonest/website only when there are changes compared to the current contents of that repository.

Your work completing this issue will help us be more efficient in managing wins data updates. Thank you!

@roslynwythe roslynwythe merged commit b3d4986 into hackforla:gh-pages Oct 18, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Complexity: Large P-Feature: Wins Page https://www.hackforla.org/wins/ role: back end/devOps Tasks for back-end developers size: 2pt Can be done in 7-12 hours
Projects
Development

Successfully merging this pull request may close these issues.

Update Google Apps Script to generate wins data feed only on Change
4 participants