climate-triage icon indicating copy to clipboard operation
climate-triage copied to clipboard

Automating new issues being posted to SoMe to increase visibility

Open Codeshark-NET opened this issue 1 year ago • 22 comments

This issue is to follow-up and scope the task, from the discussion started in: https://github.com/protontypes/climate-triage/pull/51

Codeshark-NET avatar Apr 14 '25 19:04 Codeshark-NET

Just wanted to continue the conversation from #48

Yes, and now we're getting into the trade-off territory then 😁 Because if you want to base it off the data.json file here, you also need some kind of storage to remember what you already posted on the SoMe.

If we use a GitHub action once a month to just read the issue metadata and look for issues created in the last month, we shouldn't need to store anything, right?

Ly0n avatar Apr 15 '25 07:04 Ly0n

If you need to record and check which issues got posted, I could make an API endpoint for that?

andrew avatar Apr 15 '25 09:04 andrew

How about this:

  1. Each day (less spammy), or twice a day, a workflow action runs that checks if any new issues have been created in the last 12/24 hours (since last check)
  2. If any issues have, proceed to create a "post" formatted for social media with the links to the issues and very basic information.
  3. This gets posted, automatically, on the social media channels. No need to save anywhere.

Why: Speed matters in terms of solving issues, the faster we can get eyeballs on them the faster someone can pick it up. So even if we happen to re-post an issue that was already shared, it won't necessarily be a problem for anyone.

If too many issues have been created, perhaps we need to pick top 10 or something, but that's it.

People can follow those accounts for updates, if they so wish.

CC: @felipe-lemos

Codeshark-NET avatar Apr 15 '25 10:04 Codeshark-NET

histogram of "good first" issues created in the past 30 days:

{Mon, 17 Mar 2025 => 2,
 Tue, 18 Mar 2025 => 1,
 Wed, 19 Mar 2025 => 2,
 Thu, 20 Mar 2025 => 0,
 Fri, 21 Mar 2025 => 20,
 Sat, 22 Mar 2025 => 5,
 Sun, 23 Mar 2025 => 0,
 Mon, 24 Mar 2025 => 8,
 Tue, 25 Mar 2025 => 0,
 Wed, 26 Mar 2025 => 1,
 Thu, 27 Mar 2025 => 3,
 Fri, 28 Mar 2025 => 1,
 Sat, 29 Mar 2025 => 0,
 Sun, 30 Mar 2025 => 0,
 Mon, 31 Mar 2025 => 3,
 Tue, 01 Apr 2025 => 2,
 Wed, 02 Apr 2025 => 1,
 Thu, 03 Apr 2025 => 3,
 Fri, 04 Apr 2025 => 6,
 Sat, 05 Apr 2025 => 0,
 Sun, 06 Apr 2025 => 0,
 Mon, 07 Apr 2025 => 1,
 Tue, 08 Apr 2025 => 3,
 Wed, 09 Apr 2025 => 4,
 Thu, 10 Apr 2025 => 1,
 Fri, 11 Apr 2025 => 5,
 Sat, 12 Apr 2025 => 0,
 Sun, 13 Apr 2025 => 3,
 Mon, 14 Apr 2025 => 3,
 Tue, 15 Apr 2025 => 2}

andrew avatar Apr 15 '25 10:04 andrew

I can make an end point that lists issues from the past 24 hours, which could be pulled from once per day?

andrew avatar Apr 15 '25 10:04 andrew

I can make an end point that lists issues from the past 24 hours, which could be pulled from once per day?

Yea I think that would do nicely, or just add it as a filter for the existing one?

Codeshark-NET avatar Apr 15 '25 10:04 Codeshark-NET

@andrew Would it be possible to get this histogram of "good first" issues created in the past 30 days including the issues closed in the last 30 days via an API? I think that would be the best way to create some insights into the usage / impact of the website.

Ly0n avatar Apr 15 '25 13:04 Ly0n

If you have an endpoint that shows me the issues from past 24h and if that's fine for a bot to post it daily only for you guys, then it's a no-brainer :) That'd be a really easy one.

If you want to have "online" posting, then the classy solution would be on the API itself to post this information, since it would be the "first to know" of any update regarding good first issues when they pop up (and they could even mark it as "posted", if that makes sense) :)

If this is not possible, then having this endpoint with "good first issues" of the day would work great!

felipe-lemos avatar Apr 15 '25 13:04 felipe-lemos

@andrew Would it be possible to get this histogram of "good first" issues created in the past 30 days including the issues closed in the last 30 days via an API? I think that would be the best way to create some insights into the usage / impact of the website.

added to https://ost.ecosyste.ms/api/v1/issues/climatetriage_counts

andrew avatar Apr 15 '25 14:04 andrew

I can make an end point that lists issues from the past 24 hours, which could be pulled from once per day?

Yea I think that would do nicely, or just add it as a filter for the existing one?

added a filter for past 24 hours: https://ost.ecosyste.ms/api/v1/issues?recent=true

andrew avatar Apr 15 '25 14:04 andrew

Just so you know the latest developments @felipe-lemos. ClimateTriage is doing a relaunch with GitHub next week as part of SF Climate Week and the GitHub events taking place here. GitHub might give us the most traffic we have ever had on this site

So it would be epic to have the social media posting in place. Thanks for you support!

Ly0n avatar Apr 16 '25 08:04 Ly0n

Hey guys sorry for the silence here, I just saw the news about GitHub so congrats! It's an amazing achievement! I just couldn't pick on this issue this week bc of my main project atm: managing a 1,5 months old kid 😅 but I'll take a look at it today and send an update!

felipe-lemos avatar Apr 22 '25 00:04 felipe-lemos

Got a PR for solving part of the issue: Posting to Mastodon. The workflow fetches data from the API, then if there's any post with good first issue label it posts to mastodon (multiple posts, 1 per issue). I was having many issues with posting at bsky, bc of authentication so I've decided to break it so one functionality is already up!

Please check https://github.com/protontypes/climate-triage/pull/57

felipe-lemos avatar Apr 22 '25 08:04 felipe-lemos

Ah, and it should run daily 12h utc! Let me know if that time works :)

felipe-lemos avatar Apr 22 '25 08:04 felipe-lemos

ok, updated the PR, with both Bluesky and Mastodon posting Pull Request 57

felipe-lemos avatar Apr 22 '25 20:04 felipe-lemos

Now we just need links to the mastodon and bluesky accounts added to https://climatetriage.com/

andrew avatar Apr 23 '25 08:04 andrew

Image Source: https://mastodon.social/@opensustaintech/114392853625922016

Image Source: https://bsky.app/profile/opensustaintech.bsky.social/post/3lnkofood5o2d

@felipe-lemos The basic implementation work. Respect @felipe-lemos !

Here my suggestions for improvement:

  1. Use GitHub Links so that the social media preview is been created.
  2. Less Hashtags but we should include #climatetriage.
  3. A standard text: A new GoodFirstIssue has been posted on ClimateTriage.com:

Ly0n avatar Apr 24 '25 12:04 Ly0n

I'll apply the changes later today!

felipe-lemos avatar Apr 24 '25 13:04 felipe-lemos

I tweaked the mastodon workflow here: https://github.com/protontypes/climate-triage/commit/ac635747544821dd27f2951cb2459d91fc577af2

andrew avatar Apr 25 '25 12:04 andrew

Ah cool! I guess you've changed it for both, right @andrew ?

felipe-lemos avatar Apr 27 '25 08:04 felipe-lemos

@felipe-lemos yep, mostly untested though, i just replaced url for html_url in all places

andrew avatar Apr 28 '25 09:04 andrew

The current implementation does not create a clickable link or preview card. Image

To show the preview card on BlueSky we have to set the URL for this like it did on OpenSustain.tech:

Image

https://github.com/protontypes/open-sustainable-technology/blob/main/.github/workflows/post_mastodon_and_bluesky.yml

Ly0n avatar Apr 29 '25 06:04 Ly0n