Skip to content

Commit

Permalink
enhance(secrets): update UI decode / encode / payload building for Al…
Browse files Browse the repository at this point in the history
…lowEvents (#756)
  • Loading branch information
ecrupper authored Jan 29, 2024
1 parent 1ae0459 commit 6c2af08
Show file tree
Hide file tree
Showing 12 changed files with 448 additions and 81 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/validate-pr-title.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# name of the action
name: validate PR title

# trigger on pull_request events of the opened & edited type.
on:
pull_request:
types: [opened, synchronize, edited, reopened]

# pipeline to execute
jobs:
validate:
runs-on: ubuntu-latest

steps:
- name: validate title
run: |
echo "${{ github.event.pull_request.title }}" | grep -Eq '^(feat|fix|chore|refactor|enhance|test|docs)(\(.*\)|):\s.+$' && (echo "Pass"; exit 0) || (echo "Incorrect Format. Please see https://go-vela.github.io/docs/community/contributing_guidelines/#development-workflow"; exit 1)
3 changes: 3 additions & 0 deletions cypress/fixtures/repository.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@
"comment": {
"created": false,
"edited": false
},
"schedule": {
"run": false
}
},
"pipeline_type": "yaml",
Expand Down
22 changes: 22 additions & 0 deletions cypress/fixtures/secret_org.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,27 @@
"type": "org",
"images": [],
"events": ["push"],
"allow_events": {
"push": {
"branch": true,
"tag": false
},
"pull_request": {
"opened": false,
"synchronize": false,
"edited": false,
"reopened": false
},
"deployment": {
"created": false
},
"comment": {
"created": false,
"edited": false
},
"schedule": {
"run": true
}
},
"allow_command": true
}
22 changes: 22 additions & 0 deletions cypress/fixtures/secret_repo.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,27 @@
"type": "repo",
"images": [],
"events": ["push"],
"allow_events": {
"push": {
"branch": true,
"tag": false
},
"pull_request": {
"opened": false,
"synchronize": false,
"edited": false,
"reopened": false
},
"deployment": {
"created": false
},
"comment": {
"created": false,
"edited": false
},
"schedule": {
"run": true
}
},
"allow_command": true
}
22 changes: 22 additions & 0 deletions cypress/fixtures/secret_shared.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,27 @@
"type": "shared",
"images": [],
"events": ["push"],
"allow_events": {
"push": {
"branch": true,
"tag": false
},
"pull_request": {
"opened": false,
"synchronize": false,
"edited": false,
"reopened": false
},
"deployment": {
"created": false
},
"comment": {
"created": false,
"edited": false
},
"schedule": {
"run": true
}
},
"allow_command": true
}
110 changes: 110 additions & 0 deletions cypress/fixtures/secrets_org_5.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,28 @@
"type": "org",
"images": [],
"events": ["push"],
"allow_events": {
"push": {
"branch": true,
"tag": false
},
"pull_request": {
"opened": false,
"synchronize": false,
"edited": false,
"reopened": false
},
"deployment": {
"created": false
},
"comment": {
"created": false,
"edited": false
},
"schedule": {
"run": true
}
},
"allow_command": true
},
{
Expand All @@ -21,6 +43,28 @@
"type": "org",
"images": [],
"events": ["push"],
"allow_events": {
"push": {
"branch": true,
"tag": false
},
"pull_request": {
"opened": false,
"synchronize": false,
"edited": false,
"reopened": false
},
"deployment": {
"created": false
},
"comment": {
"created": false,
"edited": false
},
"schedule": {
"run": true
}
},
"allow_command": true
},
{
Expand All @@ -33,6 +77,28 @@
"type": "org",
"images": [],
"events": ["push"],
"allow_events": {
"push": {
"branch": true,
"tag": false
},
"pull_request": {
"opened": false,
"synchronize": false,
"edited": false,
"reopened": false
},
"deployment": {
"created": false
},
"comment": {
"created": false,
"edited": false
},
"schedule": {
"run": true
}
},
"allow_command": true
},
{
Expand All @@ -45,6 +111,28 @@
"type": "org",
"images": [],
"events": ["push", "pull_request"],
"allow_events": {
"push": {
"branch": true,
"tag": false
},
"pull_request": {
"opened": false,
"synchronize": false,
"edited": false,
"reopened": false
},
"deployment": {
"created": false
},
"comment": {
"created": false,
"edited": false
},
"schedule": {
"run": true
}
},
"allow_command": true
},
{
Expand All @@ -57,6 +145,28 @@
"type": "org",
"images": [],
"events": ["push", "pull_request", "comment", "deployment"],
"allow_events": {
"push": {
"branch": true,
"tag": false
},
"pull_request": {
"opened": false,
"synchronize": false,
"edited": false,
"reopened": false
},
"deployment": {
"created": false
},
"comment": {
"created": false,
"edited": false
},
"schedule": {
"run": true
}
},
"allow_command": true
}
]
Loading

0 comments on commit 6c2af08

Please sign in to comment.