You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+34-14Lines changed: 34 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,10 +2,6 @@
2
2
3
3
This action automatically approves and merges dependabot PRs.
4
4
5
-
## Usage
6
-
7
-
-**install the [GitHub App](https://github.com/apps/dependabot-merge-action) on the repositories or organization where you want to use this action.** Using a GitHub App is necessary since [this change](https://github.blog/changelog/2021-02-19-github-actions-workflows-triggered-by-dependabot-prs-will-run-with-read-only-permissions/) GitHub introduced which limits the permissions of the provided GITHUB_TOKEN and the availability of secrets in Dependabot pull requests. The source [code of the GitHub App](https://github.com/fastify/dependabot-merge-action-app/) is open source and hosted on Google Cloud Platform. You can also host your own version of the app and customize the `api-url` input to point to your hosted instance.
8
-
- configure this action in your workflows providing the inputs described below
9
5
10
6
## Inputs
11
7
@@ -29,10 +25,6 @@ _Optional_ The merge method you would like to use (squash, merge, rebase). Defau
29
25
30
26
_Optional_ An arbitrary message that you'd like to comment on the PR after it gets auto-merged. This is only useful when you're recieving too much of noise in email and would like to filter mails for PRs that got automatically merged.
31
27
32
-
### `api-url`
33
-
34
-
_Optional_ A custom url where the external API which is delegated the task of approving and merging responds.
35
-
36
28
### `target`
37
29
38
30
_Optional_ A flag to only auto-merge updates based on Semantic Versioning. Defaults to `any`.
@@ -50,7 +42,21 @@ An example of a non-semantic version is a commit hash when using git submodules.
50
42
51
43
_Optional_ A pull request number, only required if triggered from a workflow_dispatch event. Typically this would be triggered by a script running in a seperate CI provider. See [Trigger action from workflow_dispatch event](#trigger-action-from-workflow_dispatch-event)
52
44
53
-
## Example usage
45
+
## Usage
46
+
47
+
Configure this action in your workflows providing the inputs described above.
48
+
Note that this action requires a GitHub token with additional permissions. You must use the [`permissions`](https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions#permissions) tag to specify the required rules or configure your [GitHub account](https://github.blog/changelog/2021-04-20-github-actions-control-permissions-for-github_token/).
49
+
50
+
The permissions required are:
51
+
52
+
-[`pull-requests`](https://docs.github.com/en/rest/reference/permissions-required-for-github-apps#permission-on-pull-requests) permission: it is needed to approve PRs.
53
+
-[`contents`](https://docs.github.com/en/rest/reference/permissions-required-for-github-apps#permission-on-contents) permission: it is necessary to merge the pull request. You don't need it if you set `approve-only: true`, see the example below.
54
+
55
+
If some of the required permissions are missing, the action will fail with the error message:
If you need to trigger this action manually, you can use the [workflow_dispatch](https://docs.github.com/en/actions/reference/events-that-trigger-workflows#workflow_dispatch) event. A use case might be that your CI runs on a seperate provider, so you would like to run this action as a result of a successful CI run.
115
+
If you need to trigger this action manually, you can use the [`workflow_dispatch`](https://docs.github.com/en/actions/reference/events-that-trigger-workflows#workflow_dispatch) event. A use case might be that your CI runs on a seperate provider, so you would like to run this action as a result of a successful CI run.
99
116
100
117
When using the `workflow_dispatch` approach, you will need to send the PR number as part of the input for this action:
0 commit comments