The PublicEvent occurs when someone makes a private repository public. This isn't too frequent, but it's also not uncommon. Thus, I'd like to display this properly on the live feed.
To resolve this, you'll need to:
- Inspect the structure of a
PublicEvent; see the Activity API for GitHub's REST API, the Public Event, and the dump of the REST Endpoint that we hit
- Add a
case statement for PublicEvent in GitHubEventAction.tsx
- Process the relevant parameters for the statement that we'd like to generate. I would like to see something like:
@mattxwang made uclaacm/website public
(which is hard, since the current component doesn't support this format, and thus would require a bit of refactoring. I'm open to this as well!)
or, more easily,
@mattxwang made a new repository public: uclaacm/website
Where the author and the repository are linked.
See #10 for a related issue and resolving PR!
Artifacts / Relevant Pointers
The relevant file is here:
|
function GitHubEventAction({type, payload}: GitHubEventActionProps): JSX.Element { |
The current behaviour is here:

And here is the JSON that renders those two events:
{
"id": "18372859076",
"type": "PublicEvent",
"actor": {
"id": 8324381,
"login": "uclaacm",
"display_login": "uclaacm",
"gravatar_id": "",
"url": "https://api.github.com/users/uclaacm",
"avatar_url": "https://avatars.githubusercontent.com/u/8324381?"
},
"repo": {
"id": 389225887,
"name": "uclaacm/studio-creative-tutorials-f21",
"url": "https://api.github.com/repos/uclaacm/studio-creative-tutorials-f21"
},
"payload": {
},
"public": true,
"created_at": "2021-10-11T03:26:36Z",
"org": {
"id": 8324381,
"login": "uclaacm",
"gravatar_id": "",
"url": "https://api.github.com/orgs/uclaacm",
"avatar_url": "https://avatars.githubusercontent.com/u/8324381?"
}
},
{
"id": "18372852273",
"type": "PublicEvent",
"actor": {
"id": 8324381,
"login": "uclaacm",
"display_login": "uclaacm",
"gravatar_id": "",
"url": "https://api.github.com/users/uclaacm",
"avatar_url": "https://avatars.githubusercontent.com/u/8324381?"
},
"repo": {
"id": 387991465,
"name": "uclaacm/studio-beginner-tutorials-f21",
"url": "https://api.github.com/repos/uclaacm/studio-beginner-tutorials-f21"
},
"payload": {
},
"public": true,
"created_at": "2021-10-11T03:25:37Z",
"org": {
"id": 8324381,
"login": "uclaacm",
"gravatar_id": "",
"url": "https://api.github.com/orgs/uclaacm",
"avatar_url": "https://avatars.githubusercontent.com/u/8324381?"
}
},
The
PublicEventoccurs when someone makes a private repository public. This isn't too frequent, but it's also not uncommon. Thus, I'd like to display this properly on the live feed.To resolve this, you'll need to:
PublicEvent; see the Activity API for GitHub's REST API, the Public Event, and the dump of the REST Endpoint that we hitcasestatement forPublicEventinGitHubEventAction.tsx(which is hard, since the current component doesn't support this format, and thus would require a bit of refactoring. I'm open to this as well!)
or, more easily,
Where the author and the repository are linked.
See #10 for a related issue and resolving PR!
Artifacts / Relevant Pointers
The relevant file is here:
opensource/components/GitHubEventAction.tsx
Line 12 in 7c44795
The current behaviour is here:
And here is the JSON that renders those two events:
{ "id": "18372859076", "type": "PublicEvent", "actor": { "id": 8324381, "login": "uclaacm", "display_login": "uclaacm", "gravatar_id": "", "url": "https://api.github.com/users/uclaacm", "avatar_url": "https://avatars.githubusercontent.com/u/8324381?" }, "repo": { "id": 389225887, "name": "uclaacm/studio-creative-tutorials-f21", "url": "https://api.github.com/repos/uclaacm/studio-creative-tutorials-f21" }, "payload": { }, "public": true, "created_at": "2021-10-11T03:26:36Z", "org": { "id": 8324381, "login": "uclaacm", "gravatar_id": "", "url": "https://api.github.com/orgs/uclaacm", "avatar_url": "https://avatars.githubusercontent.com/u/8324381?" } }, { "id": "18372852273", "type": "PublicEvent", "actor": { "id": 8324381, "login": "uclaacm", "display_login": "uclaacm", "gravatar_id": "", "url": "https://api.github.com/users/uclaacm", "avatar_url": "https://avatars.githubusercontent.com/u/8324381?" }, "repo": { "id": 387991465, "name": "uclaacm/studio-beginner-tutorials-f21", "url": "https://api.github.com/repos/uclaacm/studio-beginner-tutorials-f21" }, "payload": { }, "public": true, "created_at": "2021-10-11T03:25:37Z", "org": { "id": 8324381, "login": "uclaacm", "gravatar_id": "", "url": "https://api.github.com/orgs/uclaacm", "avatar_url": "https://avatars.githubusercontent.com/u/8324381?" } },