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

Gitlab v2.2.22 - Argument Description Change #33855

Merged
merged 17 commits into from Apr 18, 2024
Merged

Conversation

content-bot
Copy link
Collaborator

Original External PR

external pull request

Contributor

@mohlcyber

Status

  • In Progress
  • Ready
  • In Hold - (Reason for hold)

Related Issues

Argument Description for gitlab-file-get and gitlab-raw-file-get misleading

Description

  • Updated argument description in gitlab-file-get
  • Updated argmuent description in gitlab-raw-file-get

Must have

  • Tests
  • Documentation

* Updated Release Notes and added CONTRIBUTORS.json

* Aligned CommandResults output.

* Updated GitLabv2.yml GetFile Argument Description

* v.2.2.22

* Encoded file_path

---------

Co-authored-by: JudithB <132264628+jbabazadeh@users.noreply.github.com>
Co-authored-by: Anas Yousef <44998563+anas-yousef@users.noreply.github.com>
@content-bot content-bot added Contribution Thank you! Contributions are always welcome! docs-approved Contribution Form Filled Whether contribution form filled or not. Community pending-contributor The PR is pending the response of its creator Xsoar Support Level Indicates that the contribution is for XSOAR supported pack Internal PR labels Apr 9, 2024
@anas-yousef anas-yousef removed the pending-contributor The PR is pending the response of its creator label Apr 9, 2024
Copy link

github-actions bot commented Apr 9, 2024

Coverage

Coverage Report
FileStmtsMissCoverMissing
Packs/GitLab/Integrations/GitLabEventCollector
   GitLabEventCollector.py1221686%34–40, 132, 137–140, 257, 266, 284–285
Packs/GitLab/Integrations/GitLabv2
   GitLabv2.py72918075%40–43, 125–126, 128, 131–132, 134, 190–193, 196, 199–204, 207–210, 213–217, 225–227, 237–239, 249–251, 262–264, 267–271, 274–278, 281–284, 418, 543, 572–573, 653–657, 666–668, 675–683, 720, 722, 783–785, 793, 806–807, 812, 882, 936, 977–979, 981, 1021–1023, 1049–1053, 1061, 1198–1204, 1225–1228, 1246–1252, 1339, 1366–1380, 1384–1386, 1406–1423, 1428–1430, 1464, 1489–1494, 1516–1522, 1543–1546, 1746, 1777, 1807
TOTAL85119676% 

Tests Skipped Failures Errors Time
58 0 💤 0 ❌ 0 🔥 1.834s ⏱️

Copy link
Contributor

Choose a reason for hiding this comment

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

@maimorag
I updated to use CheckFileCommand, since running the task using ./CheckFileCommand returns an error.

@anas-yousef
Copy link
Contributor

anas-yousef commented Apr 16, 2024

@JasBeilin Concerning the encoding mechanism, I tried the following file_path arguments, and they all worked:

  1. ./CheckFileCommand
  2. dodod%2Ftest_file.py (already encoded)
  3. ./dodod%2Ftest_file.py (already encoded and starts with ./)
  4. ./dodod/test_file.py
  5. dodod/test_file.py

These should cover our cases, I also added tests for them, so should be good.

Copy link
Contributor

@maimorag maimorag left a comment

Choose a reason for hiding this comment

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

@anas-yousef looks great,
Can you update the function file_create_command (line 979) as well to keep in the same format?

Thanks :)

Copy link
Contributor

@JasBeilin JasBeilin left a comment

Choose a reason for hiding this comment

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

Looks great!

Packs/GitLab/Integrations/GitLabv2/GitLabv2.py Outdated Show resolved Hide resolved
Packs/GitLab/Integrations/GitLabv2/GitLabv2.py Outdated Show resolved Hide resolved
@anas-yousef anas-yousef merged commit a3ac85d into master Apr 18, 2024
17 checks passed
@anas-yousef anas-yousef deleted the contrib/mohlcyber_Gitlab branch April 18, 2024 08:47
barryyosi-panw pushed a commit that referenced this pull request Apr 24, 2024
* Gitlab v2.2.22 - Argument Description Change (#33637)

* Updated Release Notes and added CONTRIBUTORS.json

* Aligned CommandResults output.

* Updated GitLabv2.yml GetFile Argument Description

* v.2.2.22

* Encoded file_path

---------

Co-authored-by: JudithB <132264628+jbabazadeh@users.noreply.github.com>
Co-authored-by: Anas Yousef <44998563+anas-yousef@users.noreply.github.com>

* Fixed TPB

* Writing unit tests

* Added support for not encoding already encoded file paths

* pre-commit

* Fixed comment

* Added commit

* Fixed comments

* Added to file create command

* CR fixes

---------

Co-authored-by: Martin Ohl <Martin.Ohl@ohl-net.eu>
Co-authored-by: JudithB <132264628+jbabazadeh@users.noreply.github.com>
Co-authored-by: Anas Yousef <44998563+anas-yousef@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Community Contribution Form Filled Whether contribution form filled or not. Contribution Thank you! Contributions are always welcome! docs-approved Internal PR Xsoar Support Level Indicates that the contribution is for XSOAR supported pack
Projects
None yet
5 participants