You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Run the automated tweets script whenever a new show issue is created or updated
Preparation
Figure out how to send authenticated requests to Twitter's API using the app and user credentials. None of the existing twitter SDKs provide the APIs to update or delete scheduled tweets.
I ran into a timezone problem. The servers of GitHub Actions run on UTC timezone, and when I ran the workflow the times of the scheduled tweets were off. I had to workaround the problem by using day.js' timezone plugin. But that collided with custom time format parsing, so the resulting code ended up looking like this:
// workaround: cannot parse "June 3, 2021 1:00pm" but can parse "June 3, 2021 12:00pm"// workaround: cannot set default timezone, so parse the date/time string first, then use `.tz()` with the expected date/time formatconsttimeStringWithoutAmPm=timeString.replace(/(am|pm)\b/,"");consttmp=dayjs([dayString,timeStringWithoutAmPm].join(" "),// "MMMM D, YYYY H:mma", // see workaround"MMMM D, YYYY H:mm",true);lettime=dayjs.tz(tmp.format("YYYY-MM-DD HH:mm"),"America/Los_Angeles");
The text was updated successfully, but these errors were encountered:
💁🏻 Automating gr2m/helpdesk, Episode V
📅 Monday, June 7, 2021
🕐 12:00pm Pacific Time (in your timezone)
🎙️ no guests
🏷️ Automation
Subscribe to this issues to get a notification before the show begins and a summary after the show concludes.
Automating gr2m/helpdesk
I've laid out the current process for this repository at https://github.com/gr2m/helpdesk/tree/f085060fb98f61a005c9e79df15fdad6466c6a1a#how-i-use-this-repository. It's mostly manual. Time to spice it up a bit with some automation!
In this show, I'll will finish up the automation around tweets, following the past two episodes #20 and #20 and #12
Outline
Preparation
Recording
Shownotes
The text was updated successfully, but these errors were encountered: