Skip to content
This repository was archived by the owner on Mar 13, 2019. It is now read-only.

skip linking if the number is prefixed by 'pull request'#2

Open
victoriagrey wants to merge 1 commit into
shotgunsoftware:masterfrom
victoriagrey:master
Open

skip linking if the number is prefixed by 'pull request'#2
victoriagrey wants to merge 1 commit into
shotgunsoftware:masterfrom
victoriagrey:master

Conversation

@victoriagrey

Copy link
Copy Markdown

No description provided.

robot.hear /\s+#(\d+)/, (msg) ->
return if msg.message.user.name.match(new RegExp(githubIgnoreUsers, "gi"))

return if msg.message.match(/pull request #/i)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

/pull[-\s]?request will cover more variations.

@nemoDreamer

Copy link
Copy Markdown
Contributor

Cool idea, but we should have a regExp that won't silence cases like "here's the pull request for #12345" or "ticket #34567 has no pull request"... 😉

@nemoDreamer

Copy link
Copy Markdown
Contributor

JS sadly doesn't do negative look-back assertions in regExp... :(

@nemoDreamer

Copy link
Copy Markdown
Contributor

Sorry @neilvictorgrey , should have asked: what use-case are you covering w/ this? Is this a specific message that you're getting in Street room that contains pull-request numbers? Are you using github integration to dump messages like this into your feed?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants