Skip to content
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

Script batch update caller workflows #6

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

agnesgaroux
Copy link
Contributor

What does this change?

Since we're planning to use more of these reusable github workflows, it'd be useful to be able to open PRs to update the "caller" repositories

How to test

Try it with a safe repo?

How can we measure success?

Have we considered potential risks?

@@ -0,0 +1,178 @@
#!/usr/bin/env python
"""
Whenever a new reusable workflow is created or updated, we want to open a PR in every repository from which we want to call it.
Copy link
Contributor

@kenoir kenoir Aug 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it will always be the case that we want to strictly describe the workflows (using caller-templates) in which a reusable workflow is used. As the git ref of a reusable workflow can be specified e.g. as main, consuming workflows will get updates.

This change seems to be about updating the context in which shared workflows are used which might vary depending on the shared workflow, though in the case of the stale PR workflow this probably does make some sense.

session = boto3.Session()
secrets_client = session.client("secretsmanager")
# using the scala_libs_pr_bumps secret for now but this should have its own secret
secret_value = secrets_client.get_secret_value(SecretId="builds/github_wecobot/scala_libs_pr_bumps")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should avoid further use of GitHub API keys for weco-bot. Is the intention to automate running this script?

@kenoir
Copy link
Contributor

kenoir commented Aug 16, 2024

How can we measure success?

It's be useful to have some more context about what this is trying to achieve.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants