File tree Expand file tree Collapse file tree 2 files changed +26
-12
lines changed Expand file tree Collapse file tree 2 files changed +26
-12
lines changed Original file line number Diff line number Diff line change @@ -31084,19 +31084,26 @@ const github = __nccwpck_require__(5347);
31084
31084
try {
31085
31085
const labelName = core.getInput('label-name');
31086
31086
const context = github.context;
31087
- const prNumber = github.number;
31087
+ const prNumber = context.pull_request.number;
31088
+ const prBaseName = context.base.repo.full_name;
31089
+ const prBody = context.pull_request.body;
31088
31090
31089
- const fullNameSplit = github.full_name. split("/")
31091
+ const prBaseNameSplit = prBaseName. split("/");
31090
31092
31091
31093
const { data: pullRequest } = octokit.rest.pulls.get({
31092
- owner: fullNameSplit [0],
31093
- repo: fullNameSplit [1],
31094
+ owner: prBaseNameSplit [0],
31095
+ repo: prBaseNameSplit [1],
31094
31096
pull_number: prNumber,
31095
31097
});
31096
31098
31097
- console.log(fullNameSplit);
31099
+ console.log(pullRequest);
31100
+
31101
+ console.log(labelName)
31102
+ console.log(context)
31098
31103
console.log(prNumber)
31099
- console.log("Got information about" + pullRequest);
31104
+ console.log(prBaseName)
31105
+ console.log(prBody)
31106
+
31100
31107
31101
31108
// const payload = JSON.stringify(github.context.payload, undefined, 2)
31102
31109
// console.log(`The event payload: ${payload}`);
Original file line number Diff line number Diff line change @@ -4,19 +4,26 @@ const github = require('@actions/github');
4
4
try {
5
5
const labelName = core . getInput ( 'label-name' ) ;
6
6
const context = github . context ;
7
- const prNumber = github . number ;
7
+ const prNumber = context . pull_request . number ;
8
+ const prBaseName = context . base . repo . full_name ;
9
+ const prBody = context . pull_request . body ;
8
10
9
- const fullNameSplit = github . full_name . split ( "/" )
11
+ const prBaseNameSplit = prBaseName . split ( "/" ) ;
10
12
11
13
const { data : pullRequest } = octokit . rest . pulls . get ( {
12
- owner : fullNameSplit [ 0 ] ,
13
- repo : fullNameSplit [ 1 ] ,
14
+ owner : prBaseNameSplit [ 0 ] ,
15
+ repo : prBaseNameSplit [ 1 ] ,
14
16
pull_number : prNumber ,
15
17
} ) ;
16
18
17
- console . log ( fullNameSplit ) ;
19
+ console . log ( pullRequest ) ;
20
+
21
+ console . log ( labelName )
22
+ console . log ( context )
18
23
console . log ( prNumber )
19
- console . log ( "Got information about" + pullRequest ) ;
24
+ console . log ( prBaseName )
25
+ console . log ( prBody )
26
+
20
27
21
28
// const payload = JSON.stringify(github.context.payload, undefined, 2)
22
29
// console.log(`The event payload: ${payload}`);
You can’t perform that action at this time.
0 commit comments