File tree Expand file tree Collapse file tree 4 files changed +5
-17
lines changed Expand file tree Collapse file tree 4 files changed +5
-17
lines changed Original file line number Diff line number Diff line change 32
32
# Test with different inputs
33
33
- uses : ./
34
34
with :
35
- limit_to_pr_opened : true
36
35
add_markdown : |
37
36
---
38
37
Original file line number Diff line number Diff line change @@ -22,8 +22,6 @@ This action adds to Pull Request descriptions using markdown. It checks if the
22
22
23
23
` github_token ` : ${{ secrets.GITHUB_TOKEN }} or a Personal Access Token (PAT). Default is to inherit a token from the calling workflow.
24
24
25
- ` limit_to_pr_opened ` : Only take action when PR status is opened or reopened. Default = false.
26
-
27
25
## Permissions
28
26
29
27
#### Explicit rights
82
80
- uses : bcgov/action-pr-description-add@main
83
81
with :
84
82
github_token : " ${{ secrets.GITHUB_TOKEN }}"
85
- limit_to_pr_opened : " true"
86
83
add_markdown : |
87
84
---
88
85
@@ -104,6 +101,10 @@ BC Government QuickStart for OpenShift - [Issues](https://github.com/bcgov/quick
104
101
105
102
BC Government QuickStart for OpenShift - [Discussions](https://github.com/bcgov/quickstart-openshift/discussions)
106
103
104
+ ## Deprecations
105
+
106
+ The parameter ` limit_to_pr_opened` was deprecated due to non-use. Using this parameter will result in a warning only.
107
+
107
108
# # Contributing
108
109
109
110
Contributions are always welcome! Please send us pull requests or get in touch at the links above.
Original file line number Diff line number Diff line change @@ -12,9 +12,6 @@ inputs:
12
12
github_token :
13
13
description : " GitHub token or a Personal Access Token (PAT)"
14
14
default : ${{ github.token }}
15
- limit_to_pr_opened :
16
- description : " Only run when a PR is opened or reopened, not pushed"
17
- default : " false"
18
15
19
16
runs :
20
17
using : " node20"
Original file line number Diff line number Diff line change @@ -4,22 +4,13 @@ import {context, getOctokit} from '@actions/github'
4
4
// Action input
5
5
const markdown = getInput ( 'add_markdown' )
6
6
const token = getInput ( 'github_token' )
7
- const limit_to_pr_opened = getInput ( 'limit_to_pr_opened' )
8
7
9
- if ( ! markdown || ! token || ! limit_to_pr_opened ) {
8
+ if ( ! markdown || ! token ) {
10
9
error ( 'Error: please verify input!' )
11
10
}
12
11
13
12
// Main function
14
13
async function action ( ) : Promise < void > {
15
- // If limit_to_pr_opened is true, verify status (opened, reopened)
16
- const trigger = context . payload . action || ''
17
- const statuses = [ 'opened' , 'reopened' ]
18
- if ( limit_to_pr_opened === 'true' && ! statuses . includes ( trigger ) ) {
19
- info ( 'PR not opened or reopened with limit_to_pr_opened=true. Exiting.' )
20
- return
21
- }
22
-
23
14
// Ensure pull request exists
24
15
if ( ! context . payload . pull_request ) {
25
16
error ( 'Error: No pull request found in context. Exiting.' )
You can’t perform that action at this time.
0 commit comments