diff --git a/actions/disable_automated_security_fixes.py b/actions/disable_automated_security_fixes.py new file mode 100644 index 0000000..0cfe567 --- /dev/null +++ b/actions/disable_automated_security_fixes.py @@ -0,0 +1,13 @@ +from lib.base import BaseGithubAction + +__all__ = [ + 'DisableAutomatedSecurityFixesAction' +] + + +class DisableAutomatedSecurityFixesAction(BaseGithubAction): + def run(self, user, repo): + user = self._client.get_user(user) + repo = user.get_repo(repo) + result = repo.disable_automated_security_fixes() + return result diff --git a/actions/disable_automated_security_fixes.yaml b/actions/disable_automated_security_fixes.yaml new file mode 100644 index 0000000..6783a6d --- /dev/null +++ b/actions/disable_automated_security_fixes.yaml @@ -0,0 +1,15 @@ +--- +name: disable_automated_security_fixes +runner_type: python-script +description: Disable Automated Security Fixes on the Repo +enabled: true +entry_point: disable_automated_security_fixes.py +parameters: + user: + type: "string" + description: "User / organization name." + required: true + repo: + type: "string" + description: "Repository name." + required: true diff --git a/actions/disable_vulnerability_alert.py b/actions/disable_vulnerability_alert.py new file mode 100644 index 0000000..82c17f0 --- /dev/null +++ b/actions/disable_vulnerability_alert.py @@ -0,0 +1,13 @@ +from lib.base import BaseGithubAction + +__all__ = [ + 'DisableVulnerabilityAlertAction' +] + + +class DisableVulnerabilityAlertAction(BaseGithubAction): + def run(self, user, repo): + user = self._client.get_user(user) + repo = user.get_repo(repo) + result = repo.disable_vulnerability_alert() + return result diff --git a/actions/disable_vulnerability_alert.yaml b/actions/disable_vulnerability_alert.yaml new file mode 100644 index 0000000..412dea8 --- /dev/null +++ b/actions/disable_vulnerability_alert.yaml @@ -0,0 +1,15 @@ +--- +name: disable_vulnerability_alert +runner_type: python-script +description: Disable Vulnerability Alerts on the Repo +enabled: true +entry_point: disable_vulnerability_alert.py +parameters: + user: + type: "string" + description: "User / organization name." + required: true + repo: + type: "string" + description: "Repository name." + required: true diff --git a/actions/enable_automated_security_fixes.py b/actions/enable_automated_security_fixes.py new file mode 100644 index 0000000..efb3e8b --- /dev/null +++ b/actions/enable_automated_security_fixes.py @@ -0,0 +1,13 @@ +from lib.base import BaseGithubAction + +__all__ = [ + 'EnableAutomatedSecurityFixesAction' +] + + +class EnableAutomatedSecurityFixesAction(BaseGithubAction): + def run(self, user, repo): + user = self._client.get_user(user) + repo = user.get_repo(repo) + result = repo.enable_automated_security_fixes() + return result diff --git a/actions/enable_automated_security_fixes.yaml b/actions/enable_automated_security_fixes.yaml new file mode 100644 index 0000000..342e14c --- /dev/null +++ b/actions/enable_automated_security_fixes.yaml @@ -0,0 +1,15 @@ +--- +name: enable_automated_security_fixes +runner_type: python-script +description: Enable Automated Security Fixes on the Repo +enabled: true +entry_point: enable_automated_security_fixes.py +parameters: + user: + type: "string" + description: "User / organization name." + required: true + repo: + type: "string" + description: "Repository name." + required: true diff --git a/actions/enable_vulnerability_alert.py b/actions/enable_vulnerability_alert.py new file mode 100644 index 0000000..c2aa42b --- /dev/null +++ b/actions/enable_vulnerability_alert.py @@ -0,0 +1,13 @@ +from lib.base import BaseGithubAction + +__all__ = [ + 'EnableVulnerabilityAlertAction' +] + + +class EnableVulnerabilityAlertAction(BaseGithubAction): + def run(self, user, repo): + user = self._client.get_user(user) + repo = user.get_repo(repo) + result = repo.enable_vulnerability_alert() + return result diff --git a/actions/enable_vulnerability_alert.yaml b/actions/enable_vulnerability_alert.yaml new file mode 100644 index 0000000..06eefee --- /dev/null +++ b/actions/enable_vulnerability_alert.yaml @@ -0,0 +1,15 @@ +--- +name: enable_vulnerability_alert +runner_type: python-script +description: Enable Vulnerability Alerts on the Repo +enabled: true +entry_point: enable_vulnerability_alert.py +parameters: + user: + type: "string" + description: "User / organization name." + required: true + repo: + type: "string" + description: "Repository name." + required: true diff --git a/pack.yaml b/pack.yaml index cc2369b..5d1ef69 100755 --- a/pack.yaml +++ b/pack.yaml @@ -8,7 +8,7 @@ keywords: - git - scm - serverless -version : 1.0.0 +version : 1.0.1 python_versions: - "2" - "3"