Making WordPress.org

Opened 3 years ago

Last modified 2 years ago

#6052 new enhancement

Tag Make posts to ping teams/team-reps

Reported by: tellyworth's profile tellyworth Owned by:
Milestone: Priority: normal
Component: Make (Get Involved) / P2 Keywords:
Cc:

Description

There should be an easy way to alert specific teams, or all team reps, to a Make p2 post.

I'd suggest that we use tags and x-post for this. If someone writes a post on Make Meta with #team-reps +design at the bottom, it should:

  • Ping the #team-reps channel in Slack with a link to the post
  • x-post to Make Design
  • Ping the #design channel in Slack with a link to the x-post

That would require:

  • Adding a bot that pings the #team-reps channel with a link to any p2 post with the #team-reps tag.
  • Make sure x-post works (is it unreliable/non-functional right now?)
  • Make sure x-posting to a team p2 pings the appropriate Slack channel (if any - this could be team dependent)

Change History (9)

#1 follow-up: @dd32
3 years ago

To simplify it slightly:

  • When a post is published on Make, ping any Slack channel related to the Make site.
  • When a post is published on Make, if a channel matching the tag name is present, ping the Slack channel

Make sure x-post works (is it unreliable/non-functional right now?)

This should be working, however, it requires a full URI currently +make.wordpress.org/design/ it MUST have that trailing slash (If you use the auto-suggest when you type +.. it works, but that might not work inside the wp-admin editor, which more people are using instead of the P2/O2 editor)

I don't recall why the full URI is there, I believe it was something to do with it being a sub-folder installation. I'd like to make just +design work though.

#2 in reply to: ↑ 1 ; follow-up: @tellyworth
3 years ago

Replying to dd32:

  • When a post is published on Make, if a channel matching the tag name is present, ping the Slack channel

That's a good idea. I suspect it'd need some refinement to limit overuse and accidental use.

Improving the x-post syntax sounds like an excellent idea.

#3 in reply to: ↑ 2 @dd32
3 years ago

Replying to tellyworth:

  • When a post is published on Make, if a channel matching the tag name is present, ping the Slack channel

That's a good idea. I suspect it'd need some refinement to limit overuse and accidental use.

Given most Slack channels are named very specifically, I don't think it's actually a massive issue. Although #test #cli #props #performance #docs might be odd at times, other than test though, I wouldn't be concerned that an occasional #cli non-WP-CLI comment/post would cause issue. It might cause issue that #test could be the go-to, but the team actually lives at #core-test.

#4 @azhiyadev
3 years ago

100% agree and

When a post is published on Make, ping any Slack channel related to the Make site.
When a post is published on Make, if a channel matching the tag name is present, ping the Slack channel

I like both these ideas, we can always educate people on how they use tags if it becomes overused.

Ping the #team-reps channel in Slack with a link to the post

I also like having this as there may be instances where my team wasn't tagged but the information be worth noting.

#5 @dd32
3 years ago

In 11587:

Make: Automatically correct mis-typed cross-posts to the full URI that make requires.

This allows crossposts to be written in three formats, and converts it to the first format:

  • +make.wordpress.org/meta/ (correct, and auto-populated by the dropdowns)
  • +make.wordpress.org/meta (common, when being manually typed outside of the o2 post editor)
  • +meta (by those who are used to P2 on WordPress.com)

This should reduce some confusion with xposts not working correctly.
See #6052.

This ticket was mentioned in Slack in #meta by tellyworth. View the logs.


3 years ago

#7 @dd32
3 years ago

In r18494-dotorg:

Inline Terms / o2 xposts: Update the regex for xposts to use positive look behind/ahead to support matching multiple xposts on new lines.

See https://meta.trac.wordpress.org/ticket/6052
-       const XPOSTS_REGEX = '/(?:^|\s|>|\()\+([\w\-\.\/]+)(?:$|\b|\s|<|\))/';
+       const XPOSTS_REGEX = '/(?<=^|\s|>|\()\+([\w\-\.\/]+)(?=$|\b|\s|<|\))/';

Hard to explain, but xposts with multiple in a row with a single space between them, or with newlines between them only, would cause every second xpost to match and work.

Ie. +make.wordpress.org/site/ +make.wordpress.org/site2/ wouldn't work unless there were multiple spaces between them.
Real world example: https://make.wordpress.org/docs/2022/02/20/the-hashtag-and-its-future-in-documentation-articles/#comment-40320 Only every second item was linked. I edited and re-saved after this change and it now xpost'd to all / linked to all.

#8 @dd32
2 years ago

#6389 was marked as a duplicate.

#9 @dd32
2 years ago

In 11940:

O2: Cross-posting: Use more generic capability checks to hopefully allow cross-posting to work for non-editors, such as in comments.

See #6389, #6052.

Note: See TracTickets for help on using tickets.