Skip to content

Commit 5377527

Browse files
committed
add_description_field
1 parent ce0b941 commit 5377527

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

plugins/github/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ All of the webhooks are deleted when the plugin event source gets closed (i.e. w
7070
| `github.repo` | `string` | None | (deprecated) URL of the git repository where the event occurred. Github Webhook payloads contain the repository property when the event occurs from activity in a repository. |
7171
| `github.repo.url` | `string` | None | URL of the git repository where the event occurred. Github Webhook payloads contain the repository property when the event occurs from activity in a repository. |
7272
| `github.repo.name` | `string` | None | Name of the git repository where the event occurred. Github Webhook payloads contain the repository property when the event occurs from activity in a repository. |
73+
| `github.repo.description` | `string` | None | Description of the git repository where the event occurred. |
7374
| `github.org` | `string` | None | Name of the organization the git repository belongs to. |
7475
| `github.owner` | `string` | None | Name of the repository's owner. |
7576
| `github.repo.public` | `string` | None | 'true' if the repository affected by the action is public. 'false' otherwise. |

plugins/github/pkg/github/extract.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ func (p *Plugin) Fields() []sdk.FieldEntry {
3535
{Type: "string", Name: "github.repo", Display: "Repository", Desc: "(deprecated) URL of the git repository where the event occurred. Github Webhook payloads contain the repository property when the event occurs from activity in a repository."},
3636
{Type: "string", Name: "github.repo.url", Display: "Repository URL", Desc: "URL of the git repository where the event occurred. Github Webhook payloads contain the repository property when the event occurs from activity in a repository."},
3737
{Type: "string", Name: "github.repo.name", Display: "Repository Name", Desc: "Name of the git repository where the event occurred. Github Webhook payloads contain the repository property when the event occurs from activity in a repository."},
38+
{Type: "string", Name: "github.repo.description", Display: "Repository Description", Desc: "Description of the GitHub repository."},
3839
{Type: "string", Name: "github.org", Display: "Organization", Desc: "Name of the organization the git repository belongs to."},
3940
{Type: "string", Name: "github.owner", Display: "Owner", Desc: "Name of the repository's owner."},
4041
{Type: "string", Name: "github.repo.public", Display: "Public", Desc: "'true' if the repository affected by the action is public. 'false' otherwise."},
@@ -145,6 +146,8 @@ func getfieldStr(jdata *fastjson.Value, field string) (bool, string) {
145146
case "github.repo.name":
146147
res = string(jdata.Get("repository", "html_url").GetStringBytes())
147148
res = strings.TrimPrefix(res, "https://github.com/")
149+
case "github.repo.description":
150+
res = string(jdata.Get("repository", "description").GetStringBytes())
148151
case "github.org":
149152
res = string(jdata.Get("organization", "login").GetStringBytes())
150153
case "github.owner":

0 commit comments

Comments
 (0)