pwn 0.5.463 → 0.5.464
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +3 -3
- data/lib/pwn/plugins/jira_server.rb +35 -27
- data/lib/pwn/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8da2a09f078aabba13bc4f410a20baf3e5cb2f99b41940468c92041107a35e15
|
4
|
+
data.tar.gz: ce349029a51dc7513d1aa49823a92585521f641195c0c72fb5bda1e6a52622ef
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 211bcfd878c18e7c96ec58f8d3eefdba253f70b2922cf51bcb9f3ce0c760f9f5382d88143c068918903af995147bac5733308cdab3916de2fe1d73eb9282d9c8
|
7
|
+
data.tar.gz: 55f32eced8d19f73227670efb1779ee7cdeb3f3c87b4f4dd4a0fa2bd9d181abf8b69929a2f4837f4aa1e774b2cc1be7584e00c1a692d64dd24e5332adc8b0040
|
data/README.md
CHANGED
@@ -37,7 +37,7 @@ $ cd /opt/pwn
|
|
37
37
|
$ ./install.sh
|
38
38
|
$ ./install.sh ruby-gem
|
39
39
|
$ pwn
|
40
|
-
pwn[v0.5.
|
40
|
+
pwn[v0.5.464]:001 >>> PWN.help
|
41
41
|
```
|
42
42
|
|
43
43
|
[](https://youtu.be/G7iLUY4FzsI)
|
@@ -52,7 +52,7 @@ $ rvm use ruby-3.4.4@pwn
|
|
52
52
|
$ gem uninstall --all --executables pwn
|
53
53
|
$ gem install --verbose pwn
|
54
54
|
$ pwn
|
55
|
-
pwn[v0.5.
|
55
|
+
pwn[v0.5.464]:001 >>> PWN.help
|
56
56
|
```
|
57
57
|
|
58
58
|
If you're using a multi-user install of RVM do:
|
@@ -62,7 +62,7 @@ $ rvm use ruby-3.4.4@pwn
|
|
62
62
|
$ rvmsudo gem uninstall --all --executables pwn
|
63
63
|
$ rvmsudo gem install --verbose pwn
|
64
64
|
$ pwn
|
65
|
-
pwn[v0.5.
|
65
|
+
pwn[v0.5.464]:001 >>> PWN.help
|
66
66
|
```
|
67
67
|
|
68
68
|
PWN periodically upgrades to the latest version of Ruby which is reflected in `/opt/pwn/.ruby-version`. The easiest way to upgrade to the latest version of Ruby from a previous PWN installation is to run the following script:
|
@@ -387,7 +387,7 @@ module PWN
|
|
387
387
|
# Supported Method Parameters::
|
388
388
|
# issue_type_metadata = PWN::Plugins::JiraServer.get_issue_type_metadata(
|
389
389
|
# project_key: 'required - project key (e.g. PWN)',
|
390
|
-
# issue_type_id: 'required - issue type ID (e.g.
|
390
|
+
# issue_type_id: 'required - issue type ID (e.g. issue[:fields][:issuetype][:id] from #get_issue method)'
|
391
391
|
# )
|
392
392
|
|
393
393
|
public_class_method def self.get_issue_type_metadata(opts = {})
|
@@ -415,36 +415,44 @@ module PWN
|
|
415
415
|
|
416
416
|
project_key = issue_data[:fields][:project][:key]
|
417
417
|
summary = "CLONE - #{issue_data[:fields][:summary]}"
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
|
418
|
+
|
419
|
+
http_body = { summary: summary }
|
420
|
+
|
421
|
+
rest_call(
|
422
|
+
http_method: :post,
|
423
|
+
rest_call: "issue/#{issue}/clone",
|
424
|
+
http_body: http_body
|
425
|
+
)
|
426
|
+
# issue_type = issue_data[:fields][:issuetype][:name].downcase.to_sym
|
427
|
+
# issue_type_id = issue_data[:fields][:issuetype][:id]
|
428
|
+
|
429
|
+
# epic_name = nil
|
430
|
+
# if issue_type == :epic
|
431
|
+
# all_fields = get_all_fields
|
432
|
+
# epic_name_field_key = all_fields.find { |field| field[:name] == 'Epic Name' }[:id]
|
433
|
+
# epic_name = issue_data[:fields][epic_name_field_key.to_sym]
|
434
|
+
# end
|
435
|
+
# description = issue_data[:fields][:description]
|
428
436
|
# TODO: Better Field Handling:
|
429
437
|
# GET issue/createmeta/{projectIdOrKey}/issuetypes/{issueTypeId}
|
430
438
|
# to discover required/allowed fields dynamically before
|
431
439
|
# building the payload. Copy only what makes sense—some fields
|
432
440
|
# (e.g., status, created date) can't be set on creation.
|
433
|
-
issue_type_metadata = get_issue_type_metadata(
|
434
|
-
|
435
|
-
|
436
|
-
)
|
437
|
-
filtered_fields = issue_data[:fields].compact
|
438
|
-
additional_fields = { fields: filtered_fields }
|
439
|
-
|
440
|
-
create_issue(
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
|
446
|
-
|
447
|
-
)
|
441
|
+
# issue_type_metadata = get_issue_type_metadata(
|
442
|
+
# project_key: project_key,
|
443
|
+
# issue_type_id: issue_type_id
|
444
|
+
# )
|
445
|
+
# filtered_fields = issue_data[:fields].compact
|
446
|
+
# additional_fields = { fields: filtered_fields }
|
447
|
+
|
448
|
+
# create_issue(
|
449
|
+
# project_key: project_key,
|
450
|
+
# summary: summary,
|
451
|
+
# issue_type: issue_type,
|
452
|
+
# epic_name: epic_name,
|
453
|
+
# description: description,
|
454
|
+
# additional_fields: additional_fields
|
455
|
+
# )
|
448
456
|
rescue StandardError => e
|
449
457
|
raise e
|
450
458
|
end
|
@@ -534,7 +542,7 @@ module PWN
|
|
534
542
|
|
535
543
|
issue_type_metadata = #{self}.get_issue_type_metadata(
|
536
544
|
project_key: 'required - project key (e.g. PWN)',
|
537
|
-
issue_type_id: 'required - issue type ID (e.g.
|
545
|
+
issue_type_id: 'required - issue type ID (e.g. issue[:fields][:issuetype][:id] from #get_issue method)'
|
538
546
|
)
|
539
547
|
|
540
548
|
issue_resp = #{self}.clone_issue(
|
data/lib/pwn/version.rb
CHANGED