pwn 0.5.459 → 0.5.460
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 +39 -0
- 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: e0fd4b3e503df4cf02f8ebfd3e74650492432f45621f08bd9b7089443dfa5e4c
|
4
|
+
data.tar.gz: 0f98ea5d9af915e0cc094ec7659ddae8ce6ce17ef0bd95e11356b43e0832972b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8dcbcb9f1f2b919dde7faad6bbfa922351013e0fc793de1d4953fb412b305fb654f9842dabdfce07f3fa2661e55402a23b12e091240318fa149c7c89821f32fe
|
7
|
+
data.tar.gz: 7dd9700299cf76c776057f9b2c51ee7508d7301345e9ec52096cab4d7a8e41ee4300935b50e7fe9c630be3a53a7f35036f91246ffd7b70233b60be7d18965905
|
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.460]: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.460]: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.460]: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:
|
@@ -384,6 +384,41 @@ module PWN
|
|
384
384
|
raise e
|
385
385
|
end
|
386
386
|
|
387
|
+
# Supported Method Parameters::
|
388
|
+
# issue_resp = PWN::Plugins::JiraServer.clone_issue(
|
389
|
+
# issue: 'required - issue to clone (e.g. Bug, Issue, Story, or Epic ID)'
|
390
|
+
# )
|
391
|
+
|
392
|
+
public_class_method def self.clone_issue(opts = {})
|
393
|
+
issue = opts[:issue]
|
394
|
+
raise 'ERROR: issue cannot be nil.' if issue.nil?
|
395
|
+
|
396
|
+
issue_data = get_issue(issue: issue)
|
397
|
+
|
398
|
+
project_key = issue_data[:fields][:project][:key]
|
399
|
+
summary = "CLONE - #{issue_data[:fields][:summary]}"
|
400
|
+
issue_type = issue_data[:fields][:issuetype][:name].downcase.to_sym
|
401
|
+
epic_name = nil
|
402
|
+
if issue_type == :epic
|
403
|
+
all_fields = get_all_fields
|
404
|
+
epic_name_field_key = all_fields.find { |field| field[:name] == 'Epic Name' }[:id]
|
405
|
+
epic_name = issue_data[:fields][epic_name_field_key.to_sym]
|
406
|
+
end
|
407
|
+
description = issue_data[:fields][:description]
|
408
|
+
additional_fields = { fields: issue_data[:fields] }
|
409
|
+
|
410
|
+
create_issue(
|
411
|
+
project_key: project_key,
|
412
|
+
summary: summary,
|
413
|
+
issue_type: issue_type,
|
414
|
+
epic_name: epic_name,
|
415
|
+
description: description,
|
416
|
+
additional_fields: additional_fields
|
417
|
+
)
|
418
|
+
rescue StandardError => e
|
419
|
+
raise e
|
420
|
+
end
|
421
|
+
|
387
422
|
# Supported Method Parameters::
|
388
423
|
# issue_resp = PWN::Plugins::JiraServer.delete_issue(
|
389
424
|
# issue: 'required - issue to delete (e.g. Bug, Issue, Story, or Epic ID)'
|
@@ -467,6 +502,10 @@ module PWN
|
|
467
502
|
comment: 'optional - comment to add or update in the issue (e.g. \"This is a comment\")'
|
468
503
|
)
|
469
504
|
|
505
|
+
issue_resp = #{self}.clone_issue(
|
506
|
+
issue: 'required - issue to clone (e.g. Bug, Issue, Story, or Epic ID)'
|
507
|
+
)
|
508
|
+
|
470
509
|
issue_resp = #{self}.delete_issue(
|
471
510
|
issue: 'required - issue to delete (e.g. Bug, Issue, Story, or Epic ID)'
|
472
511
|
)
|
data/lib/pwn/version.rb
CHANGED