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

Update the slack bot title. #1066

Merged
merged 6 commits into from
Sep 27, 2023
Merged

Conversation

StevenDufresne
Copy link
Contributor

@StevenDufresne StevenDufresne commented Sep 25, 2023

This PR updates the title and description that posts to slack when a new wordcamp is scheduled.

See https://wordpress.slack.com/archives/C02RQC7RN/p1695367159820359?thread_ts=1695355705.699669&cid=C02RQC7RN

Props nao, devinmaeztri, iandunn

Copy link
Member

@iandunn iandunn left a comment

Choose a reason for hiding this comment

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

LGTM 👍🏻

$title = 'New WordCamp scheduled!!!';
$url = wp_parse_url( filter_var( $wordcamp_url, FILTER_VALIDATE_URL ) );
$tld = get_top_level_domain();
$is_event = "events.wordpress.$tld" === $url['host'];
Copy link
Member

Choose a reason for hiding this comment

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

It might be nice to turn this into a helper function where you could pass in a URL and get back wordcamp or next-gen. That'd be a good compliment to is_wordcamp_type().

We can always do that in future though, not a big deal if you don't want to for this PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

How about this: b158437?

I chose to keep the language specific to events because i don't think we need expose the type slugs in the plugins.

Copy link
Member

Choose a reason for hiding this comment

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

That looks good 👍🏻

@StevenDufresne StevenDufresne merged commit 24d3357 into production Sep 27, 2023
3 checks passed
@StevenDufresne StevenDufresne deleted the fix/slack-new-event-bot branch September 27, 2023 00:42
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