Skip to content

Conversation

@mble-sfdc
Copy link
Contributor

This commit adds an alternative annotation pattern, GUS-W-, to be used to identify a work item.

The reason for this is that GitHub autolinks
(https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/managing-repository-settings/configuring-autolinks-to-reference-external-resources#configuring-autolinks-to-reference-external-resources) do not support patterns that begin with symbols (such as @). In order to keep auto linking and enable git2gus, we add support for this additional pattern.

The pattern is case sensitive to help avoid issues with words ending with "gus" e.g. argus, bogus, asparagus.

This commit adds an alternative annotation pattern, `GUS-W-`, to be used
to identify a work item.

The reason for this is that GitHub autolinks
(https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/managing-repository-settings/configuring-autolinks-to-reference-external-resources#configuring-autolinks-to-reference-external-resources)
do not support patterns that begin with symbols (such as `@`). In order
to keep auto linking _and_ enable git2gus, we add support for this
additional pattern.

The pattern is case sensitive to help avoid issues with words ending
with "gus" e.g. `argus`, `bogus`, `asparagus`.
@salesforce-cla
Copy link

salesforce-cla bot commented May 9, 2023

Thanks for the contribution! Before we can merge this, we need @mble-sfdc to sign the Salesforce Inc. Contributor License Agreement.

@mble-sfdc
Copy link
Contributor Author

You already signed the CLA on 2023-05-09

Kinda weird, I'm an internal user after all.

@mpsenn mpsenn self-assigned this May 9, 2023
Copy link
Contributor

@mpsenn mpsenn left a comment

Choose a reason for hiding this comment

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

I like the change, but since you mentioned avoiding partial matches, wonder what you think of a minor rex change.

replace: /@/g
},
{
rex: /GUS-W-\d+/g,
Copy link
Contributor

Choose a reason for hiding this comment

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

How about \b at the start and end of this rex, so that only complete words are matched?

/\bGUS-W-\d+\b/g

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sounds good - I'll make that change.

@mpsenn mpsenn merged commit 9e2d2e6 into forcedotcom:main May 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants