fastlane-plugin-github_job_status 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9c5bd3ffe0f1564eb685b23076eb4ff7cf02ad6b
|
4
|
+
data.tar.gz: 39d8df5b92eb2821e4b00d94269c879dfd99f092
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b49cd4717e9c88582b65711b993df83bf8d583ee846f1e1c326ff6faebfcc092bb7d948f85f4ed40976e2999da81d9013da6556eff0d882dc82ba4e5740b6085
|
7
|
+
data.tar.gz: 47dcf767220736705b285f91b4da869d28b7891db084f5277909832fc921378be0573ea64caa503ffa230e3d66bbe5e8e59ddf5a4bcf1447e0213e33120a81bb
|
data/README.md
CHANGED
@@ -30,9 +30,10 @@ github_job_status(
|
|
30
30
|
)
|
31
31
|
```
|
32
32
|
|
33
|
+
* `token` can be obtained in GitHub for an owner (To do this, go to settings/Personal access tokens. Generate a new token and be sure to enable `repo:status`.)
|
33
34
|
* `state` must be pending, success, error, or failure
|
34
|
-
* `
|
35
|
-
* `job_name`, `description` and `build_url` are optional
|
35
|
+
* `sha` is optional, and the default value is the last commit hash (thanks to [last_git_commit](https://docs.fastlane.tools/actions/#last_git_commit))
|
36
|
+
* `job_name`, `description` and `build_url` are optional
|
36
37
|
|
37
38
|
## Example
|
38
39
|
|
@@ -5,7 +5,9 @@ module Fastlane
|
|
5
5
|
|
6
6
|
def self.run(params)
|
7
7
|
api = "https://api.github.com/repos"
|
8
|
-
|
8
|
+
# if sha not provided then use last_commit
|
9
|
+
sha = !params[:sha] ? Fastlane::Actions.last_git_commit_dict[:commit_hash] : params[:sha]
|
10
|
+
url = "#{api}/#{params[:owner]}/#{params[:repo]}/statuses/#{sha}"
|
9
11
|
|
10
12
|
headers = {
|
11
13
|
'Authorization' => "token #{params[:token]}",
|
@@ -89,7 +91,7 @@ module Fastlane
|
|
89
91
|
key: :sha,
|
90
92
|
env_name: 'GITHUB_JOB_STATUS_SHA',
|
91
93
|
description: 'The github sha of the commit',
|
92
|
-
|
94
|
+
optional: true
|
93
95
|
),
|
94
96
|
FastlaneCore::ConfigItem.new(
|
95
97
|
key: :job_name,
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fastlane-plugin-github_job_status
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Justin Singer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-03-
|
11
|
+
date: 2017-03-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|