Skip to content

Commit

Permalink
build: sort action names
Browse files Browse the repository at this point in the history
  • Loading branch information
gr2m committed Dec 12, 2018
1 parent 4b0ebad commit 83b5131
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 49 deletions.
94 changes: 47 additions & 47 deletions index.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
{
"name": "check_run",
"actions": [
"created",
"rerequested",
"completed",
"requested_action"
"created",
"requested_action",
"rerequested"
],
"examples": [
{
Expand Down Expand Up @@ -1735,8 +1735,8 @@
"name": "issue_comment",
"actions": [
"created",
"edited",
"deleted"
"deleted",
"edited"
],
"examples": [
{
Expand Down Expand Up @@ -1944,18 +1944,18 @@
{
"name": "issues",
"actions": [
"opened",
"edited",
"deleted",
"transferred",
"closed",
"reopened",
"assigned",
"unassigned",
"closed",
"deleted",
"demilestoned",
"edited",
"labeled",
"unlabeled",
"milestoned",
"demilestoned"
"opened",
"reopened",
"transferred",
"unassigned",
"unlabeled"
],
"examples": [
{
Expand Down Expand Up @@ -2134,8 +2134,8 @@
"name": "label",
"actions": [
"created",
"edited",
"deleted"
"deleted",
"edited"
],
"examples": [
{
Expand Down Expand Up @@ -2267,11 +2267,11 @@
{
"name": "marketplace_purchase",
"actions": [
"purchased",
"cancelled",
"changed",
"pending_change",
"pending_change_cancelled",
"changed"
"purchased"
],
"examples": [
{
Expand Down Expand Up @@ -2560,11 +2560,11 @@
{
"name": "milestone",
"actions": [
"created",
"closed",
"opened",
"created",
"deleted",
"edited",
"deleted"
"opened"
],
"examples": [
{
Expand Down Expand Up @@ -2726,8 +2726,8 @@
"name": "organization",
"actions": [
"member_added",
"member_removed",
"member_invited"
"member_invited",
"member_removed"
],
"examples": [
{
Expand Down Expand Up @@ -3017,11 +3017,11 @@
{
"name": "project_card",
"actions": [
"converted",
"created",
"deleted",
"edited",
"converted",
"moved",
"deleted"
"moved"
],
"examples": [
{
Expand Down Expand Up @@ -3177,9 +3177,9 @@
"name": "project_column",
"actions": [
"created",
"deleted",
"edited",
"moved",
"deleted"
"moved"
],
"examples": [
{
Expand Down Expand Up @@ -3313,11 +3313,11 @@
{
"name": "project",
"actions": [
"closed",
"created",
"deleted",
"edited",
"closed",
"reopened",
"deleted"
"reopened"
],
"examples": [
{
Expand Down Expand Up @@ -3597,15 +3597,15 @@
"name": "pull_request",
"actions": [
"assigned",
"unassigned",
"review_requested",
"review_request_removed",
"closed",
"edited",
"labeled",
"unlabeled",
"opened",
"edited",
"closed",
"reopened",
"review_request_removed",
"review_requested",
"unassigned",
"unlabeled",
"synchronize"
],
"examples": [
Expand Down Expand Up @@ -4056,9 +4056,9 @@
{
"name": "pull_request_review",
"actions": [
"submitted",
"dismissed",
"edited",
"dismissed"
"submitted"
],
"examples": [
{
Expand Down Expand Up @@ -4535,8 +4535,8 @@
"name": "pull_request_review_comment",
"actions": [
"created",
"edited",
"deleted"
"deleted",
"edited"
],
"examples": [
{
Expand Down Expand Up @@ -5324,12 +5324,12 @@
{
"name": "repository",
"actions": [
"archived",
"created",
"deleted",
"archived",
"unarchived",
"privatized",
"publicized",
"privatized"
"unarchived"
],
"examples": [
{
Expand Down Expand Up @@ -5632,9 +5632,9 @@
{
"name": "security_advisory",
"actions": [
"performed",
"published",
"updated",
"performed"
"updated"
],
"examples": [
{
Expand Down Expand Up @@ -5919,10 +5919,10 @@
{
"name": "team",
"actions": [
"added_to_repository",
"created",
"deleted",
"edited",
"added_to_repository",
"removed_from_repository"
],
"examples": [
Expand Down
4 changes: 2 additions & 2 deletions lib/section-to-webhook.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,15 @@ function sectionHtmlToWebhook (state, section) {
if (matches) {
return {
name,
actions: matches.map(m => m.replace(/"/g, ''))
actions: matches.map(m => m.replace(/"/g, '')).sort()
}
}

const actions = cheerio.load(listOfActionsText)('code')
.map((index, el) => {
return $(el).text().trim()
})
.get()
.get().sort()

return {
name,
Expand Down

0 comments on commit 83b5131

Please sign in to comment.