mirror of
https://git.mirrors.martin98.com/https://github.com/actions/toolkit
synced 2026-03-20 11:42:36 +08:00
Correctly pull issue number for pull request review events (#311)
This commit is contained in:
@@ -52,10 +52,11 @@ describe('@actions/context', () => {
|
||||
})
|
||||
})
|
||||
|
||||
it('works with pullRequest payloads', () => {
|
||||
it('works with pull_request payloads', () => {
|
||||
delete process.env.GITHUB_REPOSITORY
|
||||
context.payload = {
|
||||
pullRequest: {number: 2},
|
||||
// eslint-disable-next-line @typescript-eslint/camelcase
|
||||
pull_request: {number: 2},
|
||||
repository: {owner: {login: 'user'}, name: 'test'}
|
||||
}
|
||||
expect(context.issue).toEqual({
|
||||
|
||||
Reference in New Issue
Block a user