Skip to content

Conversation

@vagisha
Copy link
Collaborator

@vagisha vagisha commented Apr 21, 2025

Rationale

We would like to post a message to the Bluesky social media platform after a dataset is made public on Panorama Public.

Changes

  • Added configuration page for Bluesky Settings under Panorama Public Admin Console. This can be used to configure the following:
    • Credentials for both primary and test Bluesky accounts
    • Provide the Bluesky API endpoint URLs for login, posting, and image upload
    • Specify default hashtags for posts
    • Upload a default Panorama logo (overridden by a dataset’s catalog entry image, if available)
    • "Auto‑post" toggle (off by default) to enable automatic posting when a submitter makes a dataset public
  • Added "Post to Bluesky" menu item to the TargetedMSExperimentWebPart. This allows admins to create a post for the dataset to either the primary or test account.
  • When “auto‑post” is enabled, a Bluesky post is created immediately after a dataset is made public
  • Store generated Bluesky post URLs to a property store, linked to each dataset’s short URL

vagisha added 11 commits April 2, 2025 15:17
- Add hashtags (different hash tags when posting to test account)
- Added checkbox in ConfirmView to "Post to test account"
- Added option in Bluesky settings to save Panorama log file.
…y admin console

- Added BlueskySettings and BlueskySettingsManager classes
- Added option to auto-post to Bluesky when a dataset is made public by submitter. Confirmation message includes the Bluesky post URL.
- Added buttons for "Post to primary account" and "Post to test account".
- Save the AT uri only if posting to primary account.
- Announcement text is configurable through the settings page.
- Report account and endpoint in exception message.
@vagisha vagisha marked this pull request as ready for review April 24, 2025 20:33
@vagisha vagisha requested a review from labkey-jeckels April 24, 2025 20:33
sql.append(parentColumn).append(" IN (SELECT EntityId FROM ")
.append(CoreSchema.getInstance().getTableInfoContainers(), "c").append(")")
.append(" AND (")
.append(documentNameColumn).append(" LIKE '").append(PanoramaPublicLogoManager.LOGO_FILE_PREFIX).append("%' )");
Copy link
Contributor

Choose a reason for hiding this comment

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

This constant is unlikely to change to a dangerous value, but safer to use SQLFragment.appendStringLiteral()

catch (BlueskyException e)
{
_exception = e;
LOG.error(e);
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this will just get you the toString(). Maybe that's enough here, but you might want the two-argument version which will get you the full stack trace

@vagisha vagisha merged commit 317c07b into release25.3-SNAPSHOT Apr 29, 2025
1 check passed
@vagisha vagisha deleted the 25.3_fb_post-to-bluesky branch April 29, 2025 16:10
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.

3 participants