Conversation
This comment has been minimized.
This comment has been minimized.
Contributor
|
I'll review this PR by this weekend. |
Contributor
|
Can you add the prefix e.g. https://github.com/cloudbees-oss/smart-tests-cli/blob/main/launchable/testpath.py#L46 |
ono-max
reviewed
Sep 10, 2025
launchable/utils/link.py
Outdated
| for k, url in link_options: | ||
| # if k,v in format "kind|title=url" | ||
| if '|' in k: | ||
| kind, title = k.split('|', 1) |
Contributor
There was a problem hiding this comment.
Should we handle the whitespace?
e.g. GITHUB_PULL_REQUEST | PR = https://github.com/launchableinc/cli/pull/2
Contributor
Author
There was a problem hiding this comment.
I don't have a strong opinion on this. I stripped the values to be forgiving to user error.
ono-max
reviewed
Sep 10, 2025
| CIRCLECI_BUILD_NUM_KEY = 'CIRCLE_BUILD_NUM' | ||
| CIRCLECI_JOB_KEY = 'CIRCLE_JOB' | ||
|
|
||
| GITHUB_PR_REGEX = re.compile(r"^https://github\.com/[^/]+/[^/]+/pull/\d+$") |
Contributor
There was a problem hiding this comment.
Can we use the named group? Here is the example:
>>> p = re.compile(r'(?P<word>\b\w+\b)')
>>> m = p.search( '(((( Lots of punctuation )))' )
>>> m.group('word')
'Lots'
>>> m.group(1)
'Lots'
Contributor
Author
There was a problem hiding this comment.
Since we are not extracting any parts of the URL, I think it's better to keep it simple.
ono-max
approved these changes
Sep 10, 2025
Konboi
added a commit
that referenced
this pull request
Sep 22, 2025
Konboi
added a commit
that referenced
this pull request
Sep 22, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR extends
--linkoption to support both the formats"kind|title=url"and"title=url"Example usages:
Custom links:
Invalid kind:
Invalid URL for kind:
Infer kind:
GitHub PR links are automatically inferred as GITHUB_PULL_REQUEST.
Prioritize link options over env links:
Here GITHUB_PULL_REQUEST URL passed in the link option will be used instead of the URL set via the environment variable.