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

Integrate Bluesky as alternative to Twitterbot #2051

Merged
merged 11 commits into from
Feb 6, 2025
Merged

Integrate Bluesky as alternative to Twitterbot #2051

merged 11 commits into from
Feb 6, 2025

Conversation

amatissart
Copy link
Member

@amatissart amatissart commented Jan 27, 2025

Description

The TwitterBot client (in "twitter_api.py") is renamed into TournesolBotClient (in "client.py") and supports both Twitter and Bluesky.

The management commands run_twitterbot and tweet_top_contributors have been modified to post on Bluesky only by default.

Checklist

  • I added the related issue(s) id in the related issues section (if any)
    • if not, delete the related issues section
  • I described my changes and my decisions in the PR description
  • I read the development guidelines of the CONTRIBUTING.md
  • The tests pass and have been updated if relevant
  • The code quality check pass

@amatissart amatissart marked this pull request as ready for review February 6, 2025 10:14
)

def __str__(self):
return f"{self.video.uid} tweeted at {self.datetime_tweet}"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Posted at instead of tweeted at?

@@ -251,7 +271,7 @@ def generate_top_contributor_figure(top_contributors_qs, language="en") -> Path:
return figure_path


def tweet_top_contributor_graph(bot_name, assumeyes=False):
def tweet_top_contributor_graph(bot_name, dest: list[str], assumeyes=False):
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we want to use a more strict typing here, like dest: Literal["twitter", "bluesky"]?

@amatissart amatissart merged commit f290204 into main Feb 6, 2025
8 checks passed
@amatissart amatissart deleted the bluesky-bot branch February 6, 2025 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants