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

actions/*: streamline workflows into reusable actions #618

Merged
merged 7 commits into from
Jun 7, 2024

Conversation

thypon
Copy link
Member

@thypon thypon commented Jun 7, 2024

No description provided.

Copy link

github-actions bot commented Jun 7, 2024

[puLL-Merge] - brave/security-action@618

Description

This PR refactors the GitHub Actions in the security-action repository to use reusable action components. Rather than duplicating code in each workflow, the workflows now reference actions defined in the actions/ directory.

Changes

Changes

  • .github/workflows/add-maintainer-custom-property.yml: Replaced inline script with a call to the brave/security-action/actions/add-maintainer-custom-property@main action. Moved input parameters to the with block.
  • .github/workflows/check-new-repos.yml: Replaced inline script with a call to the brave/security-action/actions/check-new-repos@main action. Moved input parameters to the with block.
  • .github/workflows/dependabot-auto-dismiss.yml: Replaced inline script with a call to the brave/security-action/actions/dependabot-auto-dismiss@main action. Moved input parameters to the with block.
  • .github/workflows/dependabot-nudge.yml: Replaced inline script with a call to the brave/security-action/actions/dependabot-nudge@main action. Moved input parameters to the with block.
  • .github/workflows/older-than-2y.yml: Replaced inline script with a call to the brave/security-action/actions/older-than-2y@main action. Moved input parameters to the with block.
  • .github/workflows/renovate-sanity-check.yml: Replaced inline script with a call to the brave/security-action/actions/renovate-sanity-check@main action. Moved input parameters to the with block.
  • Added new actions/ directory containing reusable action components:
    • actions/add-maintainer-custom-property/: Action to add maintainer as a custom property to all repos
    • actions/check-new-repos/: Action to check for new repositories created in the last day
    • actions/dependabot-auto-dismiss/: Action to automatically dismiss certain Dependabot PRs based on rules defined in dismiss.txt
    • actions/dependabot-nudge/: Action to nudge maintainers about open Dependabot PRs
    • actions/older-than-2y/: Action to find repositories that haven't been updated in 2+ years
    • actions/renovate-sanity-check/: Action to check all repositories follow the central Renovate config
  • Moved .github/dependabot-dismiss.txt to actions/dependabot-auto-dismiss/dismiss.txt

The reusable actions import shared utility functions like sendSlackMessage from the src/ directory. Debug logging is controlled by a debug input parameter.

Possible Issues

No major issues identified. The change looks straightforward and well-structured. The only suggestion would be to consider validating the gh_to_slack_user_map input in dependabot-nudge more gracefully than relying on a try/catch.

@thypon thypon requested a review from diracdeltas June 7, 2024 13:47
@thypon thypon force-pushed the features/streamline branch 7 times, most recently from 6fd9d79 to e942899 Compare June 7, 2024 17:04
@thypon thypon force-pushed the features/streamline branch from e942899 to d3850eb Compare June 7, 2024 17:25
@brave-support-admin brave-support-admin merged commit 7ff1965 into main Jun 7, 2024
7 checks passed
@brave-support-admin brave-support-admin deleted the features/streamline branch June 7, 2024 17:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants