Skip to content

Commit

Permalink
Fix github mapping variant
Browse files Browse the repository at this point in the history
  • Loading branch information
augustuswm committed Oct 16, 2023
1 parent 2d71422 commit 68beaeb
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ cargo run -p rfd-cli mapper create --json-body /dev/stdin <<EOM
"name": "add_github_user",
"max_activations": 1,
"rule": {
"rule": "git_hub_username",
"rule": "github_username",
"github_username": "githubuser",
"groups": [
"friend-of-company"
Expand Down
2 changes: 1 addition & 1 deletion rfd-api-spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -2669,7 +2669,7 @@
"rule": {
"type": "string",
"enum": [
"git_hub_username"
"github_username"
]
}
},
Expand Down
1 change: 1 addition & 0 deletions rfd-api/src/mapper/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ impl TryFrom<Mapper> for Mapping {
pub enum MappingRules {
EmailAddress(EmailAddressMapper),
EmailDomain(EmailDomainMapper),
#[serde(rename = "github_username")]
GitHubUsername(GitHubUsernameMapper),
}

Expand Down
8 changes: 4 additions & 4 deletions rfd-sdk/src/generated/sdk.rs
Original file line number Diff line number Diff line change
Expand Up @@ -720,12 +720,12 @@ pub mod types {
#[serde(default = "defaults::mapping_rules_email_domain_permissions")]
permissions: PermissionsForApiPermission,
},
#[serde(rename = "git_hub_username")]
GitHubUsername {
#[serde(rename = "github_username")]
GithubUsername {
github_username: String,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
groups: Vec<String>,
#[serde(default = "defaults::mapping_rules_git_hub_username_permissions")]
#[serde(default = "defaults::mapping_rules_github_username_permissions")]
permissions: PermissionsForApiPermission,
},
}
Expand Down Expand Up @@ -4187,7 +4187,7 @@ pub mod types {
super::PermissionsForApiPermission(vec![])
}

pub(super) fn mapping_rules_git_hub_username_permissions(
pub(super) fn mapping_rules_github_username_permissions(
) -> super::PermissionsForApiPermission {
super::PermissionsForApiPermission(vec![])
}
Expand Down

0 comments on commit 68beaeb

Please sign in to comment.