-
Notifications
You must be signed in to change notification settings - Fork 81
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
Handle branch name with slash #1396
Handle branch name with slash #1396
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1396 +/- ##
==========================================
- Coverage 61.28% 61.20% -0.08%
==========================================
Files 136 136
Lines 10026 10045 +19
==========================================
+ Hits 6144 6148 +4
- Misses 3389 3399 +10
- Partials 493 498 +5
|
d70566a
to
e229601
Compare
We need to handle branch name with slash in the name, eg: feature/branch The user can url encode it with the %2F character, and we are able to parse it properly. Fixes openshift-pipelines#1395 Signed-off-by: Chmouel Boudjnah <[email protected]>
e229601
to
33b6b70
Compare
/lgtm |
}, | ||
{ | ||
name: "Split URL with encoding emoji in branch", | ||
url: "https://github.com/openshift-pipelines/pipelines-as-code/blob/%F0%9F%99%83/filename.yaml", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
url: "https://github.com/openshift-pipelines/pipelines-as-code/blob/%F0%9F%99%83/filename.yaml", | |
url: "https://github.com/openshift-pipelines/pipelines-as-code/blob/%F0%9F%99%83/filename.yaml", |
%F0%9F%99%83
are these standard code for emoji ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah i asked chat gpt 😁
The text "%F0%9F%99%83" is a URL-encoded representation of the emoji
We now allow users to specify a remote GitHub URL to be fetched using a token, even if the branch name contains a slash. The user can URL encoding the slash within the branch name to ensure a proper parsing by paac.
ie:
Fixes #1395
Changes
Submitter Checklist
make test
before submitting a PR (ie: with pre-commit, no need to waste CPU cycle on CI. (or even better install pre-commit and dopre-commit install
in the root of this repo).make lint
before submitting a PR. The markdownlint error can get usually fixed by runningmake fix-markdownlint
(make sure it's installed first)