Skip to content

Commit fef7f22

Browse files
committed
docs: corrections and completions and alignments
1 parent b25b9a7 commit fef7f22

13 files changed

+66
-134
lines changed

README.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ Some examples of what you can do:
2525
- Ensure pull requests follow conventions and [prevent merging][comment-if-guidelines-not-met] when it is not followed.
2626
- [Notify author of failed guidelines][comment] when opening an issue.
2727
- Schedule [detection for obsolete (stale) issues and pull requests][staleness] and notify author and collaborators.
28+
- [Auto-merge][automerge] pull requests once all checks pass.
2829
- And [more][configuration]
2930

3031
---
@@ -45,7 +46,7 @@ We need your help:
4546
- Have an **💡idea** for a **new feature**? Please [create a new issue](https://github.com/mergeability/mergeable/issues) and tell us!
4647
- **Fix a bug**, implement a new **validator** or **action** and [open a pull request](CONTRIBUTING.md)!
4748

48-
> ☝️ **NOTE:** For development and testing. You'll want to [read about how to run it locally](deploy.md#running-locally).
49+
> ☝️ **NOTE:** For development and testing. You'll want to [read about how to run it locally][run-locally].
4950
5051

5152
# Authors
@@ -58,4 +59,6 @@ AGPL, Copyright (c) 2019 [Justin Law](https://github.com/jusx) & [Shine Lee](htt
5859
[comment-if-guidelines-not-met]: https://mergeable.readthedocs.io/en/latest/recipes.html#comment-if-guidelines-not-met
5960
[comment]: https://mergeable.readthedocs.io/en/latest/actions/comment.html
6061
[staleness]: https://mergeable.readthedocs.io/en/latest/recipes.html#check-stale-pr-and-issues
62+
[automerge]: https://mergeable.readthedocs.io/en/latest/recipes.html#auto-merge-pull-requests-once-all-checks-pass
6163
[configuration]: https://mergeable.readthedocs.io/en/latest/configuration.html
64+
[run-locally]: https://mergeable.readthedocs.io/en/latest/deployment.html#running-locally

deploy.md

-58
This file was deleted.

docs/annotations.rst

+8-7
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,23 @@
1+
.. _annotations-page:
12
Annotations
23
=====================================
34

45
Annotations allows the use of dynamic values in your recipes.
56

6-
To bypass the annotation, use `\` prefix. (i.e `\@author` will be replaced with literal `@author`)
7+
To bypass the annotation, use ``\`` prefix. (i.e ``\@author`` will be replaced with literal `@author`)
78

89
::
10+
911
@author : replace with the login of creator of issues/PR
1012

11-
Actions supported
1213

13-
- assign
14-
- comment
15-
- checks
14+
Actions supported:
15+
::
1616

17+
'assign', 'comment', 'checks'
1718

1819

19-
.. note::
20-
Don't see any annotation that fits your needs? let us know by creating an `issue <https://github.com/mergeability/mergeable/issues/new>`_
20+
.. hint::
21+
Don't see any annotation that fits your needs? Let us know by creating an `issue <https://github.com/mergeability/mergeable/issues/new>`_ on github.
2122

2223

docs/configuration.rst

+11-9
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ Configuration
77

88
First, you'll need to start by creating a ``.github/mergeable.yml`` file in your repository.
99

10-
.. hint::
11-
Check out our :ref:`recipes-page` page for examples and most commonly used settings
10+
.. note::
11+
Check out our :ref:`recipes-page` page for examples and most commonly used settings.
1212

1313
Next, we'll go into how the configuration is structured.
1414

@@ -34,7 +34,7 @@ error:
3434

3535
Each recipe appears as a separate check in the pull request.
3636

37-
Here is a full example of how a recipe looks -
37+
Here is a full example of how a recipe looks:
3838

3939
.. code-block:: yml
4040
@@ -79,7 +79,7 @@ Here is a full example of how a recipe looks -
7979
- do: {{action}}
8080
8181
.. note::
82-
There are some default actions that'll be automatically applied based on the events specified
82+
There are some default actions that'll be automatically applied based on the events specified.
8383

8484
Filters
8585
------------
@@ -90,7 +90,7 @@ Filters are checks that mergeable will process in order to determine if validato
9090
Each filter have certain events that it can support, so keep an eye out for them.
9191

9292
.. hint::
93-
Don't see an filter that should be on here? Let us know by creating an `issue <https://github.com/mergeability/mergeable/issues/new>`_ on github
93+
Don't see an filter that should be on here? Let us know by creating an `issue <https://github.com/mergeability/mergeable/issues/new>`_ on github.
9494

9595
Filter List
9696

@@ -108,7 +108,7 @@ Validators are checks that mergeable will process in order to determine whether
108108
Each validator have certain events that it can support, so keep an eye out for them.
109109

110110
.. hint::
111-
Don't see an validator that should be on here? Let us know by creating an `issue <https://github.com/mergeability/mergeable/issues/new>`_ on github
111+
Don't see an validator that should be on here? Let us know by creating an `issue <https://github.com/mergeability/mergeable/issues/new>`_ on github.
112112

113113
Validator List
114114

@@ -125,6 +125,7 @@ Validator List
125125
validators/description.rst
126126
validators/headRef.rst
127127
validators/label.rst
128+
validators/lastComment.rst
128129
validators/milestone.rst
129130
validators/project.rst
130131
validators/size.rst
@@ -153,7 +154,7 @@ Options List
153154
Operators
154155
------------
155156

156-
These operators can help create more complex logic of validations
157+
These operators can help create more complex logic of validations.
157158

158159
Operator List
159160

@@ -169,7 +170,7 @@ Actions
169170
Actions that mergeable is currently able to perform.
170171

171172
.. hint::
172-
Don't see an action that should be on here? Let us know by creating an `issue <https://github.com/mergeability/mergeable/issues/new>`_ on github
173+
Don't see an action that should be on here? Let us know by creating an `issue <https://github.com/mergeability/mergeable/issues/new>`_ on github.
173174

174175
.. toctree::
175176
actions/assign.rst
@@ -185,9 +186,10 @@ Actions that mergeable is currently able to perform.
185186
Reusable Configuration
186187
--------------------------
187188

188-
YML has a feature called `Anchor<https://blog.daemonl.com/2016/02/yaml.html>`_ that allows you to create reusable parts in the config
189+
YML has a feature called `Anchor <https://blog.daemonl.com/2016/02/yaml.html>`_ that allows you to create reusable parts in the config:
189190

190191
.. code-block:: yml
192+
191193
on_fail_comment: &default_fail_comment
192194
- do: comment
193195
payload:

docs/deployment.rst

+28-15
Original file line numberDiff line numberDiff line change
@@ -4,50 +4,56 @@ Deploying
44
---------------------
55
If you would like to run your own instance of this plugin, you can do so by forking this repo and deploying it to your own servers or run it locally
66

7-
The `Probot deployment guide <https://probot.github.io/docs/deployment/>`_ describes this as well
7+
The `Probot deployment guide <https://probot.github.io/docs/deployment/>`_ describes this as well.
88

99
`Create a GitHub App <https://github.com/settings/apps/new>`_ and configure the permissions & events with the following:
1010

1111
**Settings:**
1212

1313
* GitHub app name - **Your app name**
14-
* Webhook URL - **Your webhook url for listening to events** (for local deployments you can use `smee.io <https://smee.io/>`_))
14+
* Webhook URL - **Your webhook url for listening to events** (for local deployments you can use `smee.io <https://smee.io/>`_)
1515
* Webhook secret - **Your generated webhook seceret** (GitHub app page has instructions on how to create this)
1616

17-
**Permissions:**
17+
**Repository Permissions:**
1818

1919
* Checks - **Read & Write**
2020
* Issues - **Read & Write**
21-
* Repository metadata - **Read Only**
22-
* Pull requests - **Read Only**
23-
* Commit Statuses - **Read & Write**
24-
* Single File - **Read-only**
21+
* Metadata - **Read Only**
22+
* Pull requests - **Read & Write**
23+
* Commit statuses - **Read & Write**
24+
* Single file - **Read-only**
2525
* Path: ``.github/mergeable.yml``
26-
* Repository Contents - **Read-Only**
27-
* Repository projects - **Read-Only**
26+
* Contents - **Read-Only**
27+
* Projects - **Read-Only**
28+
29+
**Organization Permissions:**
30+
31+
* Members - **Read Only**
2832

2933
**And subscription to the following events:**
3034

35+
* [x] Issue comment
36+
* [x] Issues
3137
* [x] Pull request
32-
* [x] Pull request review comment
3338
* [x] Pull request review
34-
* [x] Issues
39+
* [x] Status
3540

3641
Make sure to create a private key for the app after it's been registered.
3742

3843
Running Locally
3944
------------------
4045

41-
1. Clone the forked repository on to your machine
46+
1. Clone the forked repository on to your machine.
4247
2. Globally install smee-client from with npm ``npm install -g smee-client``
4348
3. Go to `smee.io <https://smee.io>`_ and create a new webhook OR use the cli by
4449
running the ``smee`` command.
4550
4. Copy ``.env.template`` to a new file called ``.env``, and fill it out.
46-
5. Run ``npm run dev`` in your local repository
51+
5. Run ``npm run dev`` in your local repository.
4752
6. Add a repository for your Github app by going to `application settings <https://github.com/settings/installations>`_
48-
7. Do a test pull request to check if everything is working
53+
7. Do a test pull request to check if everything is working.
4954

50-
Note: if you wish to use a different config file name besides ``mergeable.yml``, use the ``CONFIG_PATH`` environment variable. Config files use ``.github`` as base path, see `here <https://github.com/probot/probot/blob/master/src/context.ts#L230>`_.
55+
.. note::
56+
If you wish to use a different config file name besides ``mergeable.yml``, use the ``CONFIG_PATH`` environment variable. Config files use ``.github`` as base path, see `here <https://github.com/probot/probot/blob/master/src/context.ts#L230>`_.
5157

5258

5359
Possible Issues
@@ -59,6 +65,13 @@ This happens when you haven't configured the webhook secret correctly in your
5965
locally running instance. Make sure to set the ``SECRET_TOKEN`` environment variable
6066
in ``.env`` before running ``npm run dev``.
6167

68+
``ERROR probot: Integration not found``
69+
70+
This may occur when running Mergeable using a GitHub Enterpise instance.
71+
72+
To fix, try making sure you've set the `GHE_HOST` variable in `.env` to the
73+
hostname of your Enterprise instance. E.g. `GHE_HOST=github.your_company.com`.
74+
6275
.. note::
6376
For a list of possible configurable variables within mergeable, check :ref:`configurable-variables-page`
6477

docs/filters/payload.rst

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
Payload
22
^^^^^^^^^^^^^^
33

4-
Check against any available fields within the payload, each event can have different field, please refer to `github API documentation<https://docs.github.com/en/developers/webhooks-and-events/webhook-events-and-payloads>`_ for available fields.
4+
Check against any available fields within the payload, each event can have different field, please refer to `github API documentation <https://docs.github.com/en/developers/webhooks-and-events/webhook-events-and-payloads>`_ for available fields.
55

6-
An example to check if a pull_request_review event has `state` of `changes_requested`
6+
An example to check if a `pull_request_review` event has ``state`` of `changes_requested`
77

88
::
99

@@ -23,7 +23,7 @@ To check if a `pull_request` event is not a `draft`
2323
boolean:
2424
match: false
2525

26-
An example to check if a pull_request event has a `label` named `foo`
26+
An example to check if a `pull_request` event has a ``label`` named `foo`
2727

2828
::
2929

@@ -54,4 +54,4 @@ Each field must be checked using one of the following options
5454
Supported Events:
5555
::
5656

57-
'pull_request.*', 'pull_request_review.*', 'issues.*'
57+
'pull_request.*', 'pull_request_review.*', 'issues.*', 'issue_comment.*'

docs/index.rst

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ Mergeable helps automate your team's GitHub workflow without a single line of co
1414
usage.rst
1515
configuration.rst
1616
recipes.rst
17+
deployment.rst
1718
contributing.rst
1819
support.rst
1920
changelog.rst

docs/options/must_exclude.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ You can also use an array of regex matchers. If any of them match, the validatio
4545
- No
4646
- i
4747

48-
Supported Validators:-
48+
Supported Validators:
4949
::
5050

51-
'baseRef', 'headRef', 'changeset', 'content', 'description', 'label', 'milestone', 'title'
51+
'author', 'baseRef', 'headRef', 'changeset', 'content', 'description', 'label', 'lastComment', 'milestone', 'title'

docs/options/must_include.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ You can also use an array of regex matchers. If any of them match, the validatio
4545
- No
4646
- i
4747

48-
Supported Validators:-
48+
Supported Validators:
4949
::
5050

51-
'baseRef', 'headRef', 'changeset', 'commit', 'content', 'description', 'label', 'milestone', 'project', 'title'
51+
'author', 'baseRef', 'headRef', 'changeset', 'commit', 'content', 'description', 'label', 'lastComment', 'milestone', 'project', 'title'

docs/recipes.rst

+5-2
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,12 @@
33
Recipes
44
--------------------------
55

6+
.. note::
7+
Check out our :ref:`annotations-page` page for possible placeholders in values.
8+
69
Work In Progress
710
"""""""""""""""""
8-
Prevent accidental merging of Pull Requests that are work in progress by labeling it WIP or prefixing the title with the abbreviation.
11+
Prevent accidental merging of Pull Requests that are work in progress by labeling it `WIP` or prefixing the title with the abbreviation.
912

1013
::
1114

@@ -18,7 +21,7 @@ Prevent accidental merging of Pull Requests that are work in progress by labelin
1821
regex: ^\[WIP\]
1922
- do: label
2023
must_exclude:
21-
regex: 'wip'
24+
regex: 'wip|work in progress'
2225

2326
No Empty Description
2427
"""""""""""""""""
File renamed without changes.

docs/validators/size.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Validates that the files specified are all part of a pull request (added or modi
1414
count: 250
1515
message: Change is very large. Should be under 250 lines of additions
1616
deletions:
17-
count: 500
17+
count: 250
1818
message: Change is very large. Should be under 250 lines of deletions.
1919
ignore_comments: false #if true, comments will not be counted toward the lines count
2020

0 commit comments

Comments
 (0)