Skip to content

Update .gitignore to support terraform modules - #8

Merged
VimukthiPerera merged 4 commits into
wso2:mainfrom
VimukthiPerera:main
Mar 3, 2026
Merged

Update .gitignore to support terraform modules#8
VimukthiPerera merged 4 commits into
wso2:mainfrom
VimukthiPerera:main

Conversation

@VimukthiPerera

@VimukthiPerera VimukthiPerera commented Mar 3, 2026

Copy link
Copy Markdown
Contributor

Purpose

Update .gitignore to support terraform modules

Goals

Update .gitignore to support terraform modules

Security checks

Summary by CodeRabbit

  • Chores
    • Updated version-control ignore rules to exclude infrastructure state and environment variable artifacts (Terraform state files and .env files).
    • Updated CI lint workflow to capture and use the actual checked-out commit SHA for lint runs, improving consistency and reliability of linting on pull requests.

@VimukthiPerera
VimukthiPerera marked this pull request as ready for review March 3, 2026 06:02
Copilot AI review requested due to automatic review settings March 3, 2026 06:02

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot wasn't able to review any files in this pull request.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@coderabbitai

coderabbitai Bot commented Mar 3, 2026

Copy link
Copy Markdown

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

Adds Terraform and environment ignore patterns to .gitignore and updates the GitHub Actions linter workflow to capture the checked-out HEAD SHA in a dedicated step and use that output as the lint job's GITHUB_SHA.

Changes

Cohort / File(s) Summary
Infrastructure Tools
/.gitignore
Add ignore patterns for Terraform and environment artifacts: .terraform/, *.tfstate*, *.tfvars, and .env.
CI Workflow — Linter
.github/workflows/linter.yml
Add a step that runs git rev-parse HEAD and exposes it as sha; replace references to github.event.pull_request.head.sha with steps.set_lint_sha.outputs.sha for the lint job's GITHUB_SHA.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐇 I hopped through lines and hid the tracks,
Terraform crumbs tucked in my sack,
I fetched the SHA from the branch's head,
Lint will follow where my paws have led,
Quietly tidy, then leap back. ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description is incomplete, covering only Purpose, Goals, and Security checks while omitting most required template sections like Approach, User stories, Release note, Documentation, and others. Add missing sections from the template including Approach, User stories, Release note, Documentation, and other applicable sections to provide comprehensive context.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change in the changeset: adding Terraform-related ignore patterns to .gitignore.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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

Comment @coderabbitai help to get the list of available commands and usage tips.

HiranAdikari
HiranAdikari previously approved these changes Mar 3, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (1)
.gitignore (1)

26-30: Consider renaming section or clarifying scope.

The section is named "Infrastructure Tools" but the PR objectives specifically mention "support Terraform modules." The inclusion of generic patterns like .env (line 30) and Ansible-specific patterns like *.retry (line 29) suggests a broader scope than just Terraform. Consider either:

  • Renaming to "# Infrastructure & Environment Tools" for clarity
  • Or splitting into separate sections for Terraform and other tools
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.gitignore around lines 26 - 30, Rename or split the ".gitignore" section
currently titled "Infrastructure Tools" to better reflect the entries it
contains: either change the header to "# Infrastructure & Environment Tools" or
create two headers such as "# Terraform" (containing ".terraform/",
"*.tfstate*") and "# Other Tools" (containing "*.retry", ".env"); update the
block around the existing patterns (.terraform/, *.tfstate*, *.retry, .env)
accordingly so the scope is clear and entries are grouped by tool/type.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.gitignore:
- Line 29: The .gitignore entry "*.retry" is Ansible-specific and may confuse
readers since the PR claim is about Terraform modules; update the .gitignore by
either removing the "*.retry" pattern or moving it into a clearly labeled
Ansible section/comment so the file reflects scope accurately and keeps
Terraform-related ignores separate; reference the "*.retry" pattern in your
change and ensure any new section/header indicates "Ansible" if you keep the
entry.
- Around line 26-30: The .gitignore currently excludes Terraform state and env
files (.terraform, *.tfstate*, *.retry, .env) but omits Terraform variable files
which can contain secrets; update the file to add patterns like *.tfvars and
*.tfvars.json (and optionally override files like terraform.tfvars and
*.auto.tfvars) so files matching those patterns are ignored and sensitive
Terraform variables are not committed.

---

Nitpick comments:
In @.gitignore:
- Around line 26-30: Rename or split the ".gitignore" section currently titled
"Infrastructure Tools" to better reflect the entries it contains: either change
the header to "# Infrastructure & Environment Tools" or create two headers such
as "# Terraform" (containing ".terraform/", "*.tfstate*") and "# Other Tools"
(containing "*.retry", ".env"); update the block around the existing patterns
(.terraform/, *.tfstate*, *.retry, .env) accordingly so the scope is clear and
entries are grouped by tool/type.

ℹ️ Review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4298c5a and e152155.

📒 Files selected for processing (1)
  • .gitignore

Comment thread .gitignore
Comment thread .gitignore Outdated
@VimukthiPerera
VimukthiPerera requested a review from Copilot March 3, 2026 06:07

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot wasn't able to review any files in this pull request.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/workflows/linter.yml:
- Around line 19-20: Replace mutable pull ref usage "ref: refs/pull/${{
github.event.pull_request.number }}/head" with the immutable PR head SHA by
using the event payload value (github.event.pull_request.head.sha) wherever the
mutable ref is used (including the other occurrences noted). Update all
instances referencing refs/pull/.../head to instead set ref to ${{
github.event.pull_request.head.sha }} so the workflow checks out the exact
commit SHA tied to the PR event.

ℹ️ Review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e152155 and c32dfe8.

📒 Files selected for processing (2)
  • .github/workflows/linter.yml
  • .gitignore
🚧 Files skipped from review as they are similar to previous changes (1)
  • .gitignore

Comment thread .github/workflows/linter.yml Outdated
HiranAdikari
HiranAdikari previously approved these changes Mar 3, 2026
HiranAdikari
HiranAdikari previously approved these changes Mar 3, 2026
@VimukthiPerera
VimukthiPerera merged commit 8184c72 into wso2:main Mar 3, 2026
3 of 4 checks passed
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.

3 participants