Skip to content

feat: sync from template repo #3

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

Merged
merged 1 commit into from
May 15, 2025
Merged

feat: sync from template repo #3

merged 1 commit into from
May 15, 2025

Conversation

westonplatter
Copy link
Member

@westonplatter westonplatter commented May 15, 2025

what

Resolves tests getting stuck
CleanShot 2025-05-15 at 17 17 12@2x

Summary by CodeRabbit

  • Chores
    • Updated repository code owners to the open-source team.
    • Enhanced Renovate configuration to support GitHub Actions dependencies and improved grouping/labeling for Terraform and OpenTofu updates.
    • Improved lint workflow with concurrency control, pinned action versions, and added a job to enforce semantic pull request titles.
    • Updated test workflow to use a composite action for Terraform testing and changed trigger for improved security.
    • Upgraded actions in the trunk-upgrade workflow and added automatic PR merging after upgrades.
    • Minor documentation update in the release workflow (removed a comment).

Copy link
Contributor

coderabbitai bot commented May 15, 2025

Walkthrough

This update revises repository automation and configuration files. It changes code ownership defaults, enhances Renovate dependency management for GitHub Actions and Terraform, improves linting and testing workflows with concurrency and semantic checks, updates action versions, and introduces automatic PR merging in upgrade workflows. No application code or public API changes are present.

Changes

File(s) Change Summary
.github/CODEOWNERS Changed default code owners from @masterpointio/masterpoint-internal to @masterpointio/masterpoint-open-source.
.github/renovate.json5 Added "github-actions" manager, refined "terraform" file matching, introduced dynamic labeling, and added package rules for nuanced grouping and automerge/review handling for GitHub Actions and Terraform dependencies.
.github/workflows/lint.yaml Introduced concurrency control, pinned actions to specific commit hashes, and added a conventional-title job to enforce semantic PR titles.
.github/workflows/release-please.yaml Removed a comment from the permissions block; no functional change.
.github/workflows/test.yaml Changed the trigger to pull_request_target, renamed the job, and replaced multi-step setup with a single composite action for Terraform testing.
.github/workflows/trunk-upgrade.yaml Updated action versions, added step IDs, and introduced an automated PR merge step using GitHub CLI if an upgrade PR is created.

Sequence Diagram(s)

sequenceDiagram
    participant Developer
    participant GitHub Actions
    participant Renovate Bot
    participant GitHub CLI

    Developer->>GitHub Actions: Open PR / Push changes
    GitHub Actions->>GitHub Actions: Run lint workflow (with concurrency & semantic title check)
    GitHub Actions->>GitHub Actions: Run test workflow (composite Terraform test action)
    Renovate Bot->>GitHub Actions: Propose dependency update PRs (GitHub Actions & Terraform)
    GitHub Actions->>GitHub Actions: Run trunk-upgrade workflow
    GitHub Actions->>GitHub CLI: Merge PR automatically if upgrade PR exists
Loading

Poem

🎉
Automation’s gears now finely tuned,
With owners, bots, and labels pruned.
Actions pinned and merges swift,
PR titles checked—no rules to drift!
Renovate dances, dependencies aligned,
In workflows seamless, progress we find.
🚀

Note

⚡️ AI Code Reviews for VS Code, Cursor, Windsurf

CodeRabbit now has a plugin for VS Code, Cursor and Windsurf. This brings AI code reviews directly in the code editor. Each commit is reviewed immediately, finding bugs before the PR is raised. Seamless context handoff to your AI code agent ensures that you can easily incorporate review feedback.
Learn more here.


Note

⚡️ Faster reviews with caching

CodeRabbit now supports caching for code and dependencies, helping speed up reviews. This means quicker feedback, reduced wait times, and a smoother review experience overall. Cached data is encrypted and stored securely. This feature will be automatically enabled for all accounts on May 16th. To opt out, configure Review - Disable Cache at either the organization or repository level. If you prefer to disable all data retention across your organization, simply turn off the Data Retention setting under your Organization Settings.
Enjoy the performance boost—your workflow just got faster.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (3)
.github/workflows/trunk-upgrade.yaml (1)

37-43: Automate merge of upgrade PRs with error handling.
Introducing a “Merge PR automatically” step streamlines trunk upgrades. Consider adding explicit error logging or status checks around the gh pr merge command to surface failures (e.g., conflicts) and ensure the job fails fast if merging doesn’t succeed.

.github/workflows/lint.yaml (1)

24-29: Introduce semantic PR title enforcement.
The new conventional-title job with amannn/action-semantic-pull-request@… ensures PR titles follow your conventions. You may optionally add a needs: lint dependency if you'd like title checks to run after linting completes.

.github/renovate.json5 (1)

40-62: Consider differentiating Terraform and OpenTofu groupings.

While the configuration correctly manages different file types and registries, all updates are grouped under the same "tf" groupName. Consider using distinct group names (like "terraform" and "opentofu") to make it easier to distinguish between updates for each system when reviewing PRs.

  {
    "matchManagers": ["terraform"],
    "groupName": "tf",
    "addLabels": ["needs-review"]
  },
  {
    "matchFileNames": ["**/*.tofu", "**/*.tf"],
    "matchDatasources": ["terraform-provider", "terraform-module"],
    "registryUrls": ["https://registry.opentofu.org"],
-   "groupName": "tf"
+   "groupName": "opentofu-providers-modules"
  },
  {
    "matchFileNames": ["**/*.tofu"],
    "matchDepTypes": ["required_version"],
    "registryUrls": ["https://registry.opentofu.org"],
-   "groupName": "tf"
+   "groupName": "opentofu-core"
  },
  {
    "matchFileNames": ["**/*.tf"],
    "matchDepTypes": ["required_version"],
    "registryUrls": ["https://registry.terraform.io"],
-   "groupName": "tf"
+   "groupName": "terraform-core"
  }
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge Base: Disabled due to data retention organization setting

📥 Commits

Reviewing files that changed from the base of the PR and between 187687d and fca3d85.

📒 Files selected for processing (6)
  • .github/CODEOWNERS (1 hunks)
  • .github/renovate.json5 (1 hunks)
  • .github/workflows/lint.yaml (2 hunks)
  • .github/workflows/release-please.yaml (1 hunks)
  • .github/workflows/test.yaml (2 hunks)
  • .github/workflows/trunk-upgrade.yaml (2 hunks)
🔇 Additional comments (14)
.github/workflows/test.yaml (3)

7-7: Assess trigger change implications.
Switching the workflow trigger from pull_request to pull_request_target allows access to secrets in the context of untrusted forks. Please confirm that this change aligns with your security requirements and that no sensitive data is unintentionally exposed.


18-18: Update job name for clarity.
Using an emoji and the dynamic ${{ matrix.tf }} variable makes the job name more descriptive and friendly in the Actions UI.


24-28: Use composite action for Terraform testing.
Consolidating checkout, install, caching, and Terraform commands into masterpointio/github-action-tf-test@… significantly streamlines the workflow. Pinning to a commit hash ensures reproducibility—excellent choice!

.github/workflows/release-please.yaml (1)

11-11: Remove outdated comment.
The extraneous # required for label creation comment was removed while preserving the issues: write permission. This cleanup improves clarity without altering functionality.

.github/CODEOWNERS (1)

7-7: Update default code owners to open-source team.
Changing from @masterpointio/masterpoint-internal to @masterpointio/masterpoint-open-source aligns ownership with the repository’s community focus.

.github/workflows/trunk-upgrade.yaml (2)

20-20: Pin checkout action to a commit hash.
Locking actions/checkout at @11bd719… (v4.2.2) prevents unexpected breaking changes from upstream—great for reproducibility.


30-31: Add step ID and pin trunk-action version.
Assigning id: trunk-upgrade enables later reference to outputs, and pinning trunk-io/trunk-action/upgrade at a specific commit ensures stability.

.github/workflows/lint.yaml (3)

3-5: Add concurrency to lint workflow.
Cancelling in-progress runs on the same branch reduces CI load and race conditions—well implemented!


20-20: Pin checkout action to a commit hash.
Locking actions/checkout at @11bd719… (v4.2.2) keeps your workflow insulated from upstream breaking changes.


22-22: Pin trunk-action version.
Updating trunk-io/trunk-action to a specific commit (v1.1.19) enhances reproducibility and aligns with other workflows.

.github/renovate.json5 (4)

7-8: Great addition of GitHub Actions to the enabledManagers list.

Adding GitHub Actions as a managed dependency type is a good improvement for keeping GitHub workflow dependencies up to date alongside Terraform dependencies.


14-17: Good addition of fileMatch pattern for both Terraform and OpenTofu.

The inclusion of both .tf and .tofu file extensions demonstrates forward-thinking preparation for OpenTofu support, which is particularly relevant given HashiCorp's recent license changes.


19-24: Improved configuration with dynamic labeling.

The relocation of global settings improves readability, and the change from static labeling to dynamic {{manager}} labeling provides more specific information about each type of dependency update.


26-39: Well-structured GitHub Actions update rules.

The separation of GitHub Actions updates into auto-mergeable (minor/patch) versus manual review (major) is a best practice that balances automation with safety.

@westonplatter westonplatter mentioned this pull request May 15, 2025
1 task
@westonplatter westonplatter merged commit d2b7081 into main May 15, 2025
3 checks passed
@westonplatter westonplatter deleted the fix/ghas branch May 15, 2025 23:19
@github-actions github-actions bot mentioned this pull request May 9, 2025
westonplatter added a commit that referenced this pull request May 16, 2025
## pre-merge todos
- [x] #3 

## what
- Update readme with new github repo url

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Documentation**
- Updated the README to clarify the repository's purpose and updated
example usage to reference the correct module source.
  - Updated the license file to reflect the year 2025.

- **Chores**
- Simplified the GitHub Actions workflow for testing by switching to a
composite action and updating the event trigger.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
westonplatter pushed a commit that referenced this pull request May 20, 2025
🤖 I have created a release *beep* *boop*
---


## 0.1.0 (2025-05-20)


### Features

* beef up testing
([3d14754](3d14754))
* **INT-58:** create module - add tests and examples.
([75b5eaf](75b5eaf))
* **INT-58:** first pass at setting up repo
([75b5eaf](75b5eaf))
* **INT-60:** write up knowledge base example for standard DBs + Roles
([#5](#5))
([d2d089d](d2d089d))
* setup repo, add tf code, working example
([aea1160](aea1160))
* sync from template repo
([#3](#3))
([d2b7081](d2b7081))


### Bug Fixes

* correct test for spec chars in password
([90184a7](90184a7))
* **github actions:** release-please, add permission for labels
([#3](#3))
([8b644a6](8b644a6))
* update readme repo urls
([#4](#4))
([5f2de0f](5f2de0f))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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.

1 participant