File tree Expand file tree Collapse file tree 5 files changed +40
-2013
lines changed Expand file tree Collapse file tree 5 files changed +40
-2013
lines changed Original file line number Diff line number Diff line change @@ -5,29 +5,51 @@ An action to remove an issue from a classic/V1 project board.
5
5
## Inputs
6
6
7
7
- ` issue-number ` - The number of the issue or pull request to remove
8
- - ` project-owner ` - The organization that contains the project
9
8
- ` project-number ` - The number of the project board
10
9
- ` token ` - An authentication token with access to the project board and issue/pull request
11
10
11
+ ` project-owner ` can be set if the project board is not in the current organization.
12
+
12
13
` issue-owner ` and ` issue-repository ` can be specified if the issue or pull request does not exist in the workflow's repository.
13
14
14
15
Use ` fail-not-found: true ` if you want the action to fail if the issue or pull request does not exist on the project board.
15
16
16
17
## Usage
17
18
18
- ### Remove an issue from a project board
19
+ ### Remove an issue from a project in the current organization
20
+
21
+ ``` yaml
22
+ - uses : joshmgross/remove-from-project-classic@main
23
+ with :
24
+ project-number : 123
25
+ issue-number : 10
26
+ token : ${{ secrets.PROJECT_TOKEN }}
27
+ ` ` `
28
+
29
+ ### Remove an issue form a project another organization
19
30
20
31
` ` ` yaml
21
- - name : Post message
22
- uses : joshmgross/remove-from-project-classic@main
32
+ - uses : joshmgross/remove-from-project-classic@main
23
33
with :
24
- issue-number : 1234
25
34
project-owner : github
26
- project-number : 5678
35
+ project-number : 456
36
+ issue-number : 16
37
+ token : ${{ secrets.PROJECT_TOKEN }}
38
+ ` ` `
39
+
40
+ ### Remove an issue from a separate repository
41
+
42
+ ` ` ` yaml
43
+ - uses : joshmgross/remove-from-project-classic@main
44
+ with :
45
+ project-number : 123
46
+ issue-owner : actions
47
+ issue-repository : cache
48
+ issue-number : 32
27
49
token : ${{ secrets.PROJECT_TOKEN }}
28
50
` ` `
29
51
30
- ## Not supported ( yet)
52
+ ## Not supported yet
31
53
32
54
- User and repository project boards
33
55
- Project cards that are not issues or pull requests
Original file line number Diff line number Diff line change @@ -7,12 +7,12 @@ inputs:
7
7
description : ' The number of the issue or pull request to remove.'
8
8
issue-owner :
9
9
required : false
10
- description : ' The owner of the issue or pull request to remove. Deafults to the current repository owner.'
10
+ description : ' The owner of the issue or pull request to remove. Defaults to the current repository owner.'
11
11
issue-repository :
12
12
required : false
13
13
description : ' The repository of the issue or pull request to remove. Defaults to the current repository.'
14
14
project-owner :
15
- required : true
15
+ required : false
16
16
description : ' The organization that contains the project.'
17
17
project-number :
18
18
required : true
Original file line number Diff line number Diff line change @@ -10534,9 +10534,12 @@ async function run() {
10534
10534
throw new Error("issue-number must be a number");
10535
10535
}
10536
10536
const token = core.getInput("token", { required: true });
10537
- const projectOwner = core.getInput("project-owner", { required: true });
10538
10537
const projectNumber = Number(core.getInput("project-number", { required: true }));
10539
10538
const currentRepository = github.context.payload.repository;
10539
+ const projectOwner = core.getInput("project-owner") || currentRepository?.owner.login;
10540
+ if (!projectOwner) {
10541
+ throw new Error("project-owner must be specified, unable to determine from context");
10542
+ }
10540
10543
const issueOwner = core.getInput("issue-owner") || currentRepository?.owner.login;
10541
10544
const issueRepository = core.getInput("issue-repository") || currentRepository?.name;
10542
10545
if (!issueOwner || !issueRepository) {
You can’t perform that action at this time.
0 commit comments