Skip to content

Commit f8fa458

Browse files
Automatically merged commits from pull #5
Update readme.md with Jaid/action-readme
2 parents 2d75d06 + 782dbc3 commit f8fa458

File tree

1 file changed

+50
-36
lines changed

1 file changed

+50
-36
lines changed

readme.md

Lines changed: 50 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,34 @@
33

44
Utility for making changes to a repository from a GitHub Action.
55

6+
## Installation
7+
<a href='https://npmjs.com/package/commit-from-action'><img alt='npm logo' src='https://raw.githubusercontent.com/npm/logos/master/npm%20logo/npm-logo-red.png' height=16/></a>
8+
```bash
9+
npm install --save commit-from-action@^
10+
```
11+
<a href='https://yarnpkg.com/package/commit-from-action'><img alt='Yarn logo' src='https://raw.githubusercontent.com/yarnpkg/assets/master/yarn-kitten-full.png' height=24/></a>
12+
```bash
13+
yarn add commit-from-action@^
14+
```
615

716

8-
## API Reference
9-
<a name="module_commit-from-action"></a>
17+
## Try it out
18+
Open a browser's JavaScript console and execute:
1019

11-
## commit-from-action
20+
```javascript
21+
const scriptElement = document.createElement("script");
22+
scriptElement.setAttribute("type","text/javascript");
23+
scriptElement.setAttribute("src","https://unpkg.com/commit-from-action@1.2.0");
24+
document.querySelector("head").appendChild(scriptElement);
25+
```
26+
27+
The module is now loaded in a variable.
28+
29+
```javascript
30+
typeof commit-from-action.default
31+
```
32+
33+
## Documentation
1234

1335
* [commit-from-action](#module_commit-from-action)
1436
* [module.exports](#exp_module_commit-from-action--module.exports)
@@ -25,13 +47,7 @@ Utility for making changes to a repository from a GitHub Action.
2547
* _inner_
2648
* [~Options](#module_commit-from-action--module.exports..Options) : <code>Object</code>
2749

28-
<a name="exp_module_commit-from-action--module.exports"></a>
29-
30-
### module.exports ⏏
3150
**Kind**: Exported class
32-
<a name="new_module_commit-from-action--module.exports_new"></a>
33-
34-
#### new module.exports([options])
3551

3652
| Param | Type | Default |
3753
| --- | --- | --- |
@@ -42,46 +58,19 @@ Utility for making changes to a repository from a GitHub Action.
4258
import CommitManager from "commit-from-action"
4359
const commitManager = new CommitManager
4460
```
45-
<a name="module_commit-from-action--module.exports+commits"></a>
46-
47-
#### module.exports.commits : <code>number</code>
4861
**Kind**: instance property of [<code>module.exports</code>](#exp_module_commit-from-action--module.exports)
49-
<a name="module_commit-from-action--module.exports+branch"></a>
50-
51-
#### module.exports.branch : <code>string</code>
5262
**Kind**: instance property of [<code>module.exports</code>](#exp_module_commit-from-action--module.exports)
53-
<a name="module_commit-from-action--module.exports+pullNumber"></a>
54-
55-
#### module.exports.pullNumber : <code>number</code>
5663
**Kind**: instance property of [<code>module.exports</code>](#exp_module_commit-from-action--module.exports)
57-
<a name="module_commit-from-action--module.exports+isMerged"></a>
58-
59-
#### module.exports.isMerged : <code>boolean</code>
6064
**Kind**: instance property of [<code>module.exports</code>](#exp_module_commit-from-action--module.exports)
61-
<a name="module_commit-from-action--module.exports+isRemoved"></a>
62-
63-
#### module.exports.isRemoved : <code>boolean</code>
6465
**Kind**: instance property of [<code>module.exports</code>](#exp_module_commit-from-action--module.exports)
65-
<a name="module_commit-from-action--module.exports+prepare"></a>
66-
67-
#### module.exports.prepare() ⇒ <code>Promise.&lt;void&gt;</code>
6866
**Kind**: instance method of [<code>module.exports</code>](#exp_module_commit-from-action--module.exports)
69-
<a name="module_commit-from-action--module.exports+commit"></a>
70-
71-
#### module.exports.commit([commitMessage]) ⇒ <code>Promise.&lt;boolean&gt;</code>
7267
**Kind**: instance method of [<code>module.exports</code>](#exp_module_commit-from-action--module.exports)
7368

7469
| Param | Type |
7570
| --- | --- |
7671
| [commitMessage] | <code>string</code> |
7772

78-
<a name="module_commit-from-action--module.exports+push"></a>
79-
80-
#### module.exports.push() ⇒ <code>Promise.&lt;void&gt;</code>
8173
**Kind**: instance method of [<code>module.exports</code>](#exp_module_commit-from-action--module.exports)
82-
<a name="module_commit-from-action--module.exports..Options"></a>
83-
84-
#### module.exports~Options : <code>Object</code>
8574
**Kind**: inner typedef of [<code>module.exports</code>](#exp_module_commit-from-action--module.exports)
8675
**Properties**
8776

@@ -97,3 +86,28 @@ const commitManager = new CommitManager
9786
| githubTokenInputName | <code>string</code> | |
9887

9988

89+
90+
## License
91+
```text
92+
MIT License
93+
94+
Copyright © 2019, Jaid <jaid.jsx@gmail.com> (github.com/jaid)
95+
96+
Permission is hereby granted, free of charge, to any person obtaining a copy
97+
of this software and associated documentation files (the "Software"), to deal
98+
in the Software without restriction, including without limitation the rights
99+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
100+
copies of the Software, and to permit persons to whom the Software is
101+
furnished to do so, subject to the following conditions:
102+
103+
The above copyright notice and this permission notice shall be included in all
104+
copies or substantial portions of the Software.
105+
106+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
107+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
108+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
109+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
110+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
111+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
112+
SOFTWARE.
113+
```

0 commit comments

Comments
 (0)