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

feat: Utility for generating tooltip metadata #1095

Merged
merged 4 commits into from
Aug 1, 2024
Merged

feat: Utility for generating tooltip metadata #1095

merged 4 commits into from
Aug 1, 2024

Conversation

minghay
Copy link
Contributor

@minghay minghay commented Jul 15, 2024

Context

The new UI does not use ember data and requires extracting tooltip data from the respective API response data. A new tooltip utility class makes this metadata extraction possible.

Objective

Provide a testable utility for extracting tooltip metadata.

References

screwdriver-cd/screwdriver#3200

License

I confirm that this contribution is made under the terms of the license found in the root directory of this repository's source tree and that I have the authority necessary to make this contribution on behalf of its copyright owner.

Comment on lines 29 to 30
const externalTriggerMatch = node.name.match(/^~?sd@(\d+):([\w-]+)$/);
const downstreamTriggerMatch = node.name.match(/^~sd-([\w-]+)-triggers$/);
Copy link
Member

Choose a reason for hiding this comment

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

can we set these to constants or use anything from data-schema?
https://github.com/screwdriver-cd/data-schema/blob/master/config/regex.js#L78

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sadly, I was only able to use one regex in the data schema.

@minghay minghay merged commit 0fbf2f4 into master Aug 1, 2024
2 checks passed
@minghay minghay deleted the tooltip-util branch August 1, 2024 19:50
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