rake_github 0.8.0.pre.11 → 0.8.0.pre.12

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 649efb9262692c94cea8cb666173fafec80461322a248d4b639f3788816b0532
4
- data.tar.gz: 0cffc7541a38dfe8ed2669bc708c183f822d8ff1f42916e2898dd6f8a4b03233
3
+ metadata.gz: a568190efb3c840f1f27293957966f0aab5a9d4e8a33dd3773b542e141687ef7
4
+ data.tar.gz: a2affd21d3e9bef11aa10b6056e082b99210dd42f1f5291b7535835a6a7089cb
5
5
  SHA512:
6
- metadata.gz: 0f94e3e75e6c3486022f0c955e7885e17fe0715e612a6b8ed74ddf00b2cf6563ceaf0398509700b7bdb1e506f449ec40660dbd7f0f8c3c99b5046e63129787b2
7
- data.tar.gz: d5d5f06e6ea1677dce461000a3f7c7c533792762777f1fe28ed2dfe446f06be78a53f93eb07c55f0563bc4aa7a76a0c30ffe2fed4ca0bae1863d4f2cf755b4ab
6
+ metadata.gz: 2b4db03dd388d9aa5e73c86fb23c96311f6b7161f8e25999ff332a38d03c794782153320e73598c60a92ffe4e9e3203b31ae0ec4a88a379dac335885afa2725f
7
+ data.tar.gz: 3c69574c626c83d86899481eabdc62ab35ea8e8bbb1d2340b30d11f2ead8606800cef29e1e2b2bd9a5c5aa7d8177e728c7a4aa3871eb15cc3e0027eebc42a43a
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rake_github (0.8.0.pre.11)
4
+ rake_github (0.8.0.pre.12)
5
5
  colored2 (~> 3.1)
6
6
  octokit (~> 4.16)
7
7
  rake_factory (~> 0.23)
data/README.md CHANGED
@@ -20,7 +20,69 @@ Or install it yourself as:
20
20
 
21
21
  ## Usage
22
22
 
23
- TODO: Write usage instructions here
23
+ ### define_deploy_keys_tasks
24
+
25
+ ### define_repository_tasks
26
+
27
+ Sets up rake tasks for managing deploy keys and merging pull requests.
28
+
29
+ ```ruby
30
+ require 'rake_github'
31
+
32
+ RakeGithub.define_repository_tasks(
33
+ namespace: :github,
34
+ repository: 'org/repo', # required
35
+ ) do |t, args|
36
+ t.access_token = "your_github_access_token" # required
37
+ t.deploy_keys = [
38
+ {
39
+ title: 'CircleCI',
40
+ public_key: File.read('path/to/your_deploy_key.public')
41
+ }
42
+ ]
43
+ t.branch_name = args.branch_name
44
+ t.commit_message = args.commit_message
45
+ end
46
+ ```
47
+
48
+ | Parameter | Type | Required | Description | Example | Default |
49
+ |---------------------------------|--------|----------|------------------------------------------------------------|--------------------------------------------------------|--------------------------------------|
50
+ | repository | string | Y | Repository to perform tasks upon | 'organisation/repository_name' | N/A |
51
+ | access_token | string | Y | Github token for authorisation | 'ghp_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' | N/A |
52
+ | deploy_keys | array | N | Keys to deploy to repository | { title: string, public_key: string, read_only: bool } | [ ] |
53
+ | deploy_keys_namespace | symbol | N | Namespace to contain deploy keys tasks | :deploy_tasks | :deploy_keys |
54
+ | deploy_keys_destroy_task_name | symbol | N | Option to change the destroy task name | :obliterate | :destroy |
55
+ | deploy_keys_provision_task_name | symbol | N | Option to change the provision task name | :add | :provision |
56
+ | deploy_keys_ensure_task_name | symbol | N | Option to change the ensure task name | :destroy_and_provision | :ensure |
57
+ | namespace | symbol | N | Namespace for tasks to live in, defaults to root namespace | :rake_github | N/A |
58
+ | branch_name | string | N | Branch that can be merged | 'cool_new_feature' | N/A |
59
+ | commit_message | string | N | Merge commit message | 'merged PR using Rake Github' | "" (retains original commit message) |
60
+
61
+ Exposes tasks:
62
+ ```shell
63
+ $ rake -T
64
+
65
+ rake github:deploy_keys:destroy
66
+ rake github:deploy_keys:ensure
67
+ rake github:deploy_keys:provision
68
+ rake github:pull_requests:merge[branch_name,commit_message]
69
+ ```
70
+
71
+ #### deploy_keys:provision
72
+ Provisions deploy keys to the specified repository.
73
+
74
+ #### deploy_keys:destroy
75
+ Destroys deploy keys from the specified repository.
76
+
77
+ #### deploy_keys:ensure
78
+ Destroys and then provisions deploy keys on the specified repository.
79
+
80
+ #### pull_requests:merge[branch_name,commit_message]
81
+ Merges the PR associated with the `branch_name`. Branch name is required.
82
+
83
+ `commit_message` is optional, and can contain the original commit message with the `%s` placeholder, e.g. `pull_requests:merge[new_feature,"%s [skip ci]"]`.
84
+
85
+ ### define_release_task
24
86
 
25
87
  ## Development
26
88
 
@@ -1,3 +1,3 @@
1
1
  module RakeGithub
2
- VERSION = '0.8.0.pre.11'
2
+ VERSION = '0.8.0.pre.12'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rake_github
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0.pre.11
4
+ version: 0.8.0.pre.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - InfraBlocks Maintainers
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-01-27 00:00:00.000000000 Z
11
+ date: 2022-01-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: colored2