Skip to content

ServiceNow integration and accept file #50

New issue

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

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

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.relay.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ Generally the naming works like:
| **Bitbucket Hosted** | `BITBUCKET_API=https://bitbucket.mycompany.com`, `BITBUCKET_USERNAME`, `BITBUCKET_PASSWORD` |
| **Jira** | `JIRA_API=https://jira.mycompany.com`, `JIRA_USERNAME`, `JIRA_TOKEN` |
| **Jira Bearer/Cloud** | Arg `-s bearer`, `JIRA_API=https://mycompany.atlassian.com`, `JIRA_TOKEN` |
| **ServiceNow** | `SERVICENOW_INSTANCE_NAME=my-instance` from "https://my-instance.service-now.com", `SERVICENOW_USERNAME`, `SERVICENOW_PASSWORD` |

## How it works

Expand Down
3 changes: 2 additions & 1 deletion agent/common/integration.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ const (
IntegrationSonarqube Integration = "sonarqube"
IntegrationBitbucket Integration = "bitbucket"
IntegrationPrometheus Integration = "prometheus"
IntegrationServiceNow Integration = "servicenow"
)

var subtypes = map[Integration][]string{
Expand Down Expand Up @@ -60,7 +61,7 @@ func ParseIntegration(s string) (Integration, error) {
}

func ValidIntegrations() []Integration {
return []Integration{IntegrationGithub, IntegrationJira, IntegrationGitlab, IntegrationBitbucket, IntegrationSonarqube, IntegrationPrometheus}
return []Integration{IntegrationGithub, IntegrationJira, IntegrationGitlab, IntegrationBitbucket, IntegrationSonarqube, IntegrationPrometheus, IntegrationServiceNow}
}

type IntegrationInfo struct {
Expand Down
14 changes: 14 additions & 0 deletions agent/server/snykbroker/accept_files/accept.servicenow.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"private": [
{
"method": "any",
"path": "/*",
"origin": "https://${SERVICENOW_INSTANCE_NAME}.service-now.com",
"auth": {
"scheme": "basic",
"username": "${SERVICENOW_USERNAME}",
"password": "${SERVICENOW_PASSWORD}"
}
}
]
}
Loading