File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -22,11 +22,11 @@ jobs:
2222
2323 - name : Extract email from issue
2424 id : extract-email
25- run : echo "::set-output name=email:: $(echo '${{ github.event.issue.title }}' | sed 's/New subscription: //')"
25+ run : echo "EMAIL= $(echo '${{ github.event.issue.title }}' | sed 's/New subscription: //')" >> $GITHUB_ENV
2626
2727 - name : Run script to add email to Google Sheets
2828 env :
2929 GOOGLE_SERVICE_ACCOUNT_JSON : ${{ secrets.GOOGLE_SERVICE_ACCOUNT_JSON }}
3030 SPREADSHEET_ID : ${{ secrets.SPREADSHEET_ID }}
31- EMAIL_TO_ADD : ${{ steps.extract-email.outputs.email }}
31+ EMAIL_TO_ADD : ${{ env.EMAIL }}
3232 run : node scripts/add-email-to-sheets.js
Original file line number Diff line number Diff line change 157157< body >
158158 < div class ="container ">
159159 < img src ="/CDN/MEDIA/RIVERCHECK.png " alt ="RIVERCHECK ">
160- < div class ="title "> RIVERCHECK</ div >
161- < form onsubmit ="submitForm(event) ">
160+ < div class ="title "> RIVERCHECK< br > < br > COMING SOON < /div >
161+ <!--< form onsubmit="submitForm(event)">
162162 <input type="email" name="email" placeholder="E-MAIL ADDRESS" required oninput="clearMessage()">
163163 <input type="submit" value="✓">
164164 </form>
165- < div id ="message " class ="message "> </ div >
165+ <div id="message" class="message"></div>-->
166166 </ div >
167167</ body >
168168</ html >
Original file line number Diff line number Diff line change @@ -10,13 +10,15 @@ async function appendEmailToSheet(email) {
1010
1111 const client = await auth . getClient ( ) ;
1212
13+ const currentDate = new Date ( ) . toISOString ( ) ; // Get the current date in ISO format
14+
1315 await sheets . spreadsheets . values . append ( {
1416 auth : client ,
1517 spreadsheetId : SPREADSHEET_ID ,
16- range : 'Sheet1!A:A' ,
18+ range : 'Sheet1!A:B' , // Append to columns A and B
1719 valueInputOption : 'RAW' ,
1820 resource : {
19- values : [ [ email ] ] ,
21+ values : [ [ email , currentDate ] ] , // Append email and current date
2022 } ,
2123 } ) ;
2224}
You can’t perform that action at this time.
0 commit comments