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

fix: allow pipes to be present in git username #20040

Conversation

blakepettersson
Copy link
Member

@blakepettersson blakepettersson commented Sep 21, 2024

Pipe symbol | can potentially appear in the username. Fixes #15949.

Checklist:

  • Either (a) I've created an enhancement proposal and discussed it with the community, (b) this is a bug fix, or (c) this does not need to be in the release notes.
  • The title of the PR states what changed and the related issues number (used for the release note).
  • The title of the PR conforms to the Toolchain Guide
  • I've included "Closes [ISSUE #]" or "Fixes [ISSUE #]" in the description to automatically close the associated issue.
  • I've updated both the CLI and UI to expose my feature, or I plan to submit a second PR with them.
  • Does this PR require documentation updates?
  • I've updated documentation as required by this PR.
  • I have signed off all my commits as required by DCO
  • I have written unit and/or e2e tests for my change. PRs without these are unlikely to be merged.
  • My build is green (troubleshooting builds).
  • My new feature complies with the feature status guidelines.
  • I have added a brief description of why this PR is necessary and/or what this PR solves.
  • Optional. My organization is added to USERS.md.
  • Optional. For bug fixes, I've indicated what older releases this fix should be cherry-picked into (this may or may not happen depending on risk/complexity).

@blakepettersson blakepettersson requested a review from a team as a code owner September 21, 2024 00:35
Copy link

bunnyshell bot commented Sep 21, 2024

❌ Preview Environment deleted from Bunnyshell

Available commands (reply to this comment):

  • 🚀 /bns:deploy to deploy the environment

Copy link

bunnyshell bot commented Sep 21, 2024

❌ Preview Environment deleted from Bunnyshell

Available commands (reply to this comment):

  • 🚀 /bns:deploy to deploy the environment

Copy link

codecov bot commented Sep 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Please upload report for BASE (master@9ac1670). Learn more about missing BASE report.
Report is 480 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##             master   #20040   +/-   ##
=========================================
  Coverage          ?   55.81%           
=========================================
  Files             ?      320           
  Lines             ?    44397           
  Branches          ?        0           
=========================================
  Hits              ?    24778           
  Misses            ?    17056           
  Partials          ?     2563           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

util/git/client.go Outdated Show resolved Hide resolved
dosmanak and others added 2 commits September 21, 2024 14:25
… symbol

pipe symbol '|' could appear in username or commit message body

Signed-off-by: Petr Studeny <studenyp@gmail.com>
Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com>
@blakepettersson blakepettersson force-pushed the fix/pipe-symbols-in-git-revision-metadata branch from e056f8d to bf0c54b Compare September 21, 2024 12:31
util/git/client_test.go Outdated Show resolved Hide resolved
blakepettersson and others added 2 commits September 21, 2024 15:52
Co-authored-by: Petr Studeny <studenyp@gmail.com>
Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com>
Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com>
@blakepettersson blakepettersson changed the title fix: allow pipes to be present in git username and message fix: allow pipes to be present in git username Sep 22, 2024
Copy link
Member

@nitishfy nitishfy left a comment

Choose a reason for hiding this comment

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

LGTM!

@crenshaw-dev crenshaw-dev merged commit 6002c7d into argoproj:master Oct 8, 2024
33 checks passed
@blakepettersson blakepettersson deleted the fix/pipe-symbols-in-git-revision-metadata branch October 8, 2024 12:15
ali-hamza-noor pushed a commit to ali-hamza-noor/argo-cd that referenced this pull request Oct 10, 2024
* fix: [argoproj#15949] split git revision metadata by newline not pipe symbol

pipe symbol '|' could appear in username or commit message body

Signed-off-by: Petr Studeny <studenyp@gmail.com>

* test: add test

Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com>

* Update util/git/client_test.go

Co-authored-by: Petr Studeny <studenyp@gmail.com>
Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com>

* test: fix test

Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com>

---------

Signed-off-by: Petr Studeny <studenyp@gmail.com>
Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com>
Co-authored-by: Petr Studeny <studenyp@gmail.com>
Signed-off-by: alnoor <alihamzanoor99@gmail.com>
austin5219 pushed a commit to austin5219/argo-cd that referenced this pull request Oct 16, 2024
* fix: [argoproj#15949] split git revision metadata by newline not pipe symbol

pipe symbol '|' could appear in username or commit message body

Signed-off-by: Petr Studeny <studenyp@gmail.com>

* test: add test

Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com>

* Update util/git/client_test.go

Co-authored-by: Petr Studeny <studenyp@gmail.com>
Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com>

* test: fix test

Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com>

---------

Signed-off-by: Petr Studeny <studenyp@gmail.com>
Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com>
Co-authored-by: Petr Studeny <studenyp@gmail.com>
Signed-off-by: austin5219 <3936059+austin5219@users.noreply.github.com>
adriananeci pushed a commit to adriananeci/argo-cd that referenced this pull request Dec 4, 2024
* fix: [argoproj#15949] split git revision metadata by newline not pipe symbol

pipe symbol '|' could appear in username or commit message body

Signed-off-by: Petr Studeny <studenyp@gmail.com>

* test: add test

Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com>

* Update util/git/client_test.go

Co-authored-by: Petr Studeny <studenyp@gmail.com>
Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com>

* test: fix test

Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com>

---------

Signed-off-by: Petr Studeny <studenyp@gmail.com>
Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com>
Co-authored-by: Petr Studeny <studenyp@gmail.com>
Signed-off-by: Adrian Aneci <aneci@adobe.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Revision metadata breaks with | in commit author name
5 participants