-
-
Notifications
You must be signed in to change notification settings - Fork 777
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
Update Google Apps Script to generate wins data feed only on Change #4154
Comments
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment has been minimized.
This comment has been minimized.
ETA for this entire issue: 7/3/2024. I think I could complete the setup steps by this coming Sunday, 6/9/2024. |
@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! |
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 |
No such output for wins-form-respones. git diff Code.js |
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. |
This comment has been minimized.
This comment has been minimized.
Successfully set up test environment and finally resolved authentication issues on my end. Just need to make the appropriate changes in both files. |
Will need to implement a deeper comparison of the wins-form-responses and |
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.
If you need help, be sure to either: 1) place your issue in the You are receiving this comment because your last comment was before Tuesday, August 27, 2024 at 12:04 AM PST. |
Hi @iancooperman please leave an update regarding the comparison you mentioned above. Also, are you still having authentication errors when posting _wins_data.json to your test repository? I am asking because I would like to know if there is something missing in the instructions. Thanks Ian. |
Hey @roslynwythe. I'm sorry for not being more active. I've been dreadfully sick the past few days. After trying various methods to go through the spreadsheet data and the I'd like to test it a bit more before making a PR for this. And I also haven't run into the authentication error again. Go figure. |
I am currently working on writing new material for the Wins Admin Guide and the wiki "Automations for Wins page using Google Apps Script". PR will come soon after that is finished. |
Proposed updated entry for "Automations for Wins page using Google Apps Script": Automations for Wins page using Google Apps Script
|
Hi, I have been awaiting a rereview on the linked PR for the past three weeks. If Roslyn is currently unavailable to complete it, I would appreciate it if another dev lead could take over. Thank you. |
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
wins-form-responses
andgh-requests
so setup will be required in both/google-apps-script/wins-form-responses
and/google-apps-script/gh-requests
main()
in debug mode.main()
for testing, you must follow instructions in Testing WINS in a test repositoryclasp
utility can be used to transfer code back and forth between the local worksation and the Google Drive as needed.Suggested Solutions to Implement
getSHA(filename)
so that it returns not just the SHA but also the json contents. To reflect this change, change the name of the function togetWins(filename)
. Back inmain()
, compare the returned JSON to the data just compiled from the spreadsheet. If differences are detected, proceed to callupdateWinsFile
.Testing
main()
runs when there have been no changes to Wins data, the script will not create any commits/PRs in the test GitHub repositorymain()
in debug mode and confirm that a new commit and a new Pull Request "Update wins-data.json via Google Apps Script" is created in your test repository. Runmain()
again and confirm that no additional commits have been noted in the Pull Request. Merge the Pull Request into your test branch then view the wins webpage in the test branch and confirm that the corresponding wins entry is not displayed.After successful testing
dev lead:
Resources/Instructions
Footnotes
Wins Apps Script Development Process ↩ ↩2
Wins Form Admin Guide ↩ ↩2
Wins-form (Response) Sheet ↩ ↩2
The text was updated successfully, but these errors were encountered: