-
Notifications
You must be signed in to change notification settings - Fork 5
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
Wy/wakeup actions lambda #6
base: main
Are you sure you want to change the base?
Conversation
Does not completely close issue #2 (changed to avoid automatically closing the issue) |
I seem to have re-enabled all our timed out workflows with a PAT that doesn't have permissions to do that, so I'm not sure how we'll verify this now 🤔 Also the |
What were the PAT permissions? And for who were they generated? |
import pprint | ||
import requests | ||
|
||
IS_LAMBDA = bool(os.getenv("AWS_EXECUTION_ENV")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IS_LAMBDA = bool(os.getenv("AWS_EXECUTION_ENV")) |
|
||
# Get keyword arguments from environment variables | ||
return { | ||
"login_or_token": os.getenv("GH_LOGIN_OR_TOKEN"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should not be an environment variable. It needs to be stored in SecretsManager and using boto to retrieve it.
|
||
# Get all repos that are not forks and are not archived | ||
# Only supports repos owned by an organization for now, | ||
# but could be changed to users |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# but could be changed to users | |
# but could be changed to users | |
# TODO: Support non-organizational repositories |
@@ -0,0 +1,30 @@ | |||
#!/usr/bin/env python |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand the point of this file, why not just have everything in one script?
This adds some functionality to get all the workflows for an organization, and to filter for the ones disabled by inactivity
It also starts to separate logic for retrieving arguments used by KeepAlive so that in the future it will be easy to add support for multiple platforms