Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[BUG]: requester property required on app installation event #939

Open
1 task done
noe-charmet opened this issue Jun 14, 2024 · 3 comments
Open
1 task done

[BUG]: requester property required on app installation event #939

noe-charmet opened this issue Jun 14, 2024 · 3 comments
Labels
Type: Bug Something isn't working as documented

Comments

@noe-charmet
Copy link

noe-charmet commented Jun 14, 2024

What happened?

The app installation event schema #/definitions/installation$created defines as an optional object the requester property. However this is a nullabke property. The API will return a null value and not an empty one. I can observe this when an admin does the install without an approval workflow.
This is also confirmed by the typing declared in the public documentation.

Versions

@octokit/webhooks-schemas 7.5.1

Relevant log output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@noe-charmet noe-charmet added Status: Triage This is being looked at and prioritized Type: Bug Something isn't working as documented labels Jun 14, 2024
Copy link
Contributor

👋 Hi! Thank you for this contribution! Just to let you know, our GitHub SDK team does a round of issue and PR reviews twice a week, every Monday and Friday! We have a process in place for prioritizing and responding to your input. Because you are a part of this community please feel free to comment, add to, or pick up any issues/PRs that are labeled with Status: Up for grabs. You & others like you are the reason all of this works! So thank you & happy coding! 🚀

@wolfy1339 wolfy1339 removed the Status: Triage This is being looked at and prioritized label Jun 14, 2024
@wolfy1339
Copy link
Member

Can you provide an up-to-date example payload that demonstrates the issue?

I will update this soon

@nickfloyd nickfloyd moved this from 🆕 Triage to 🔥 Backlog in 🧰 Octokit Active Jun 14, 2024
@noe-charmet
Copy link
Author

noe-charmet commented Jun 15, 2024

Thanks for reaching back.
Example payload taken from the application web-hook delivery history. This does not pass AJV validation currently as requester is null while the schema expect a User object or undefined.

Webhook payload
{
  "action": "created",
  "installation": {
    "id": 51842726,
    "account": {
      "login": "AllegoriaHQ",
      "id": 163036520,
      "node_id": "O_kgDOCbe9aA",
      "avatar_url": "https://avatars.githubusercontent.com/u/163036520?v=4",
      "gravatar_id": "",
      "url": "https://api.github.com/users/AllegoriaHQ",
      "html_url": "https://github.com/AllegoriaHQ",
      "followers_url": "https://api.github.com/users/AllegoriaHQ/followers",
      "following_url": "https://api.github.com/users/AllegoriaHQ/following{/other_user}",
      "gists_url": "https://api.github.com/users/AllegoriaHQ/gists{/gist_id}",
      "starred_url": "https://api.github.com/users/AllegoriaHQ/starred{/owner}{/repo}",
      "subscriptions_url": "https://api.github.com/users/AllegoriaHQ/subscriptions",
      "organizations_url": "https://api.github.com/users/AllegoriaHQ/orgs",
      "repos_url": "https://api.github.com/users/AllegoriaHQ/repos",
      "events_url": "https://api.github.com/users/AllegoriaHQ/events{/privacy}",
      "received_events_url": "https://api.github.com/users/AllegoriaHQ/received_events",
      "type": "Organization",
      "site_admin": false
    },
    "repository_selection": "all",
    "access_tokens_url": "https://api.github.com/app/installations/51842726/access_tokens",
    "repositories_url": "https://api.github.com/installation/repositories",
    "html_url": "https://github.com/organizations/AllegoriaHQ/settings/installations/51842726",
    "app_id": 880846,
    "app_slug": "allegoria-ci-visibility",
    "target_id": 163036520,
    "target_type": "Organization",
    "permissions": {
      "members": "read",
      "actions": "read",
      "checks": "read",
      "metadata": "read",
      "statuses": "read"
    },
    "events": [

    ],
    "created_at": "2024-06-14T10:21:18.000+02:00",
    "updated_at": "2024-06-14T10:21:19.000+02:00",
    "single_file_name": null,
    "has_multiple_single_files": false,
    "single_file_paths": [

    ],
    "suspended_by": null,
    "suspended_at": null
  },
  "repositories": [
    {
      "id": 771942238,
      "node_id": "R_kgDOLgLnXg",
      "name": "allegoria",
      "full_name": "AllegoriaHQ/allegoria",
      "private": true
    },
    {
      "id": 775970613,
      "node_id": "R_kgDOLkBfNQ",
      "name": "test-reporters-js",
      "full_name": "AllegoriaHQ/test-reporters-js",
      "private": false
    }
  ],
  "requester": null,
  "sender": {
    "login": "noe-charmet",
    "id": 59678972,
    "node_id": "MDQ6VXNlcjU5Njc4OTcy",
    "avatar_url": "https://avatars.githubusercontent.com/u/59678972?v=4",
    "gravatar_id": "",
    "url": "https://api.github.com/users/noe-charmet",
    "html_url": "https://github.com/noe-charmet",
    "followers_url": "https://api.github.com/users/noe-charmet/followers",
    "following_url": "https://api.github.com/users/noe-charmet/following{/other_user}",
    "gists_url": "https://api.github.com/users/noe-charmet/gists{/gist_id}",
    "starred_url": "https://api.github.com/users/noe-charmet/starred{/owner}{/repo}",
    "subscriptions_url": "https://api.github.com/users/noe-charmet/subscriptions",
    "organizations_url": "https://api.github.com/users/noe-charmet/orgs",
    "repos_url": "https://api.github.com/users/noe-charmet/repos",
    "events_url": "https://api.github.com/users/noe-charmet/events{/privacy}",
    "received_events_url": "https://api.github.com/users/noe-charmet/received_events",
    "type": "User",
    "site_admin": false
  }
}

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Type: Bug Something isn't working as documented
Projects
Status: 🔥 Backlog
Development

No branches or pull requests

2 participants