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
feat: support set status commit on push event (#307)
* feat: support push events
* no-release: added workflow to test new feature
* fix: pushed release version and fixed lint
* fix: updated dependencies
* fix: removed actions added to test the action
* fix: use same name to set status
Copy file name to clipboardExpand all lines: README.md
+72-17Lines changed: 72 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,10 +5,14 @@
5
5
6
6
## Overview
7
7
8
-
A simple Github Action that allows us to update the status of the last commit in a pull request.
8
+
A simple Github Action that allows us to update the status of a commit.
9
9
10
10
GitHub does not update the status of a commit when running workflow and therefore tools that rely on the context/status of a given commit are not compatible with it.
11
11
12
+
Currently the action supports `pull_request` and `push` events:
13
+
* When the event is `pull_request`, the action will set the status to the last commit in the pull request at the moment the workflow was triggered.
14
+
* When the event is `push`, the action will set the status to the last commit pushed at the moment the workflow was triggered.
15
+
12
16
## Input Parameters
13
17
14
18
* token: Auth token used to add status commits
@@ -22,7 +26,7 @@ GitHub does not update the status of a commit when running workflow and therefor
22
26
23
27
* status: Commit or job status, based on this the action will set the correct status in the commit: Accepted values are: `error`, `failure`, `pending`, `success` and `cancelled`.
24
28
25
-
If the passed status is `pending` it wil set status commit `pending`.
29
+
If the passed status is `pending` it will set status commit `pending`.
26
30
27
31
If the passed status is `failure` or `cancelled` it will set status commit `failure`.
28
32
@@ -43,34 +47,85 @@ GitHub does not update the status of a commit when running workflow and therefor
43
47
* optional
44
48
* default: ""
45
49
46
-
* ignoreForks: If the pull request is from a fork the action won't add a status by default. This is because the action won't have a token with permissions to add the status to the commit. You can disable this, but then you'll have to provide a token with enough permissions to add status to the commits in the forks!
50
+
* ignoreForks: If the pull request is from a fork the action won't add a status by default. This is because the action won't have a token with permissions to add the status to the commit. You can disable this, but then you'll have to provide a token with enough permissions to add status to the commits in the forks!__Will be used only for pull requests.__
47
51
48
52
* optional
49
53
* default: "true"
50
54
51
-
* addHoldComment: If true the action will add a comment to the pull request. This is useful if you use prow, since prow won't detect the github actions, so you can use `/hold` and `/hold cancel` to avoid merging the PR before you want. __Important: this will be disabled for forks if `ignoreForks` is set to true, this is because the default github token won't have permissions to add comments if your PR comes from a fork__
55
+
* addHoldComment: If true the action will add a comment to the pull request. This is useful if you use prow, since prow won't detect the github actions, so you can use `/hold` and `/hold cancel` to avoid merging the PR before you want. __Important: this will be disabled for forks if `ignoreForks` is set to true, this is because the default github token won't have permissions to add comments if your PR comes from a fork. Will be used only for pull requests.__
52
56
53
57
* optional
54
58
* default: "false"
55
59
56
-
* pendingComment: This is the message to add to the pull request when the status is `pending`.
60
+
* pendingComment: This is the message to add to the pull request when the status is `pending`.__Will be used only for pull requests.__
57
61
58
62
* optional
59
63
* default: "/hold"
60
64
61
-
* successComment: This is the message to add to the pull request when the status is `success`.
65
+
* successComment: This is the message to add to the pull request when the status is `success`.__Will be used only for pull requests.__
62
66
63
67
* optional
64
68
* default: "/hold cancel"
65
69
66
-
* failComment: This is the message to add to the pull request when the status is `failure`, `error` or `cancelled`.
70
+
* failComment: This is the message to add to the pull request when the status is `failure`, `error` or `cancelled`.__Will be used only for pull requests.__
67
71
68
72
* optional
69
73
* default: "/hold"
70
74
71
75
## Examples
72
76
73
-
### Action sets commit to pending status without comment
0 commit comments