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

feat: add new env vars for org profile and local testing #2

Merged
merged 2 commits into from
Mar 31, 2025

Conversation

liamstevens
Copy link
Contributor

@liamstevens liamstevens commented Mar 26, 2025

Add references to local testing variables and information regarding GITHUB_ORG_PROFILE configuration.

Summary by CodeRabbit

  • Documentation
    • Added a new configuration option: GITHUB_ORG_PROFILE, specifying the organization profile location format.
    • Updated the description for GITHUB_APP_INSTALLATION_ID to correct spelling from "organisation" to "organization."
    • Introduced a new document detailing organization profiles, including their usage, required fields, and an example YAML configuration.
    • Enhanced documentation for Buildkite Agent containers with new environment variables required for setup.

Copy link

coderabbitai bot commented Mar 26, 2025

Walkthrough

The documentation files have been updated to include a new configuration option and a new document. The src/content/docs/reference/configuration.md file now features GITHUB_ORG_PROFILE, which requires a specific URL format, and an updated description for GITHUB_APP_INSTALLATION_ID. Additionally, a new document titled "Organization Profiles" has been created in src/content/docs/reference/organization-profile.md, detailing the use and structure of organization profiles within the Chinmina Bridge framework.

Changes

File Change Summary
src/content/docs/reference/configuration.md Added new configuration option: GITHUB_ORG_PROFILE (requires a triplet format). Updated GITHUB_APP_INSTALLATION_ID to correct spelling from "organisation" to "organization."
src/content/docs/reference/organization-profile.md New document added: "Organization Profiles" detailing the usage of organization profiles, required YAML structure, and permissions management within the Chinmina Bridge framework.
src/content/docs/contributing/development.mdx Added documentation for Buildkite Agent setup, including new environment variables: BUILDKITE_AGENT_TOKEN and BUILDKITE_AGENT_TAGS.

Possibly related PRs

  • feat: basic contribution docs #1: The changes in the main PR, specifically the introduction of the GITHUB_ORG_PROFILE configuration option, are directly related to the new documentation on organization profiles in the retrieved PR, which also discusses the usage of the GITHUB_ORG_PROFILE variable.

Poem

I hopped through docs with delight,
New tags and profiles shining bright,
Testing and GitHub find their place,
A clearer guide now in the space,
Cheers from a rabbit coding through the night! 🐰


🪧 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.
    • Generate unit testing code for this file.
    • 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 generate unit testing code for this file.
    • @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 generate unit testing code.
    • @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.

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 resolve resolve all the CodeRabbit review comments.
  • @coderabbitai plan to trigger planning for file edits and PR creation.
  • @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.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

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

@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 (2)
src/content/docs/reference/configuration.md (2)

94-97: Review of BUILDKITE_AGENT_TAGS Documentation

The addition of the BUILDKITE_AGENT_TAGS configuration option is clear and concise. It specifies that the value should be comma‐separated key-value pairs for testing, which aligns with the PR’s intent to better support local testing environments.

Consider including an example value or note about acceptable formats if further clarity is desired.


126-130: Consistency and Punctuation in GITHUB_ORG_PROFILE

The new GITHUB_ORG_PROFILE option is well documented with the expected URL format. However, there are two points to consider:

  • Language Consistency: The text uses "organisation" whereas other parts of the documentation (e.g., Buildkite OIDC section) use "organization". For consistency, consider standardizing on one variant.
  • Punctuation: A static analysis hint flagged a loose punctuation mark around this section. Please verify that the badge annotation (:badge[optional]) and accompanying punctuation conform to the style guidelines used elsewhere in the document.

A diff suggestion to harmonize the language (if "organization" is preferred) is as follows:

-###### `GITHUB_ORG_PROFILE` :badge[optional]
-The location of your organisation profile, if in use. This should be a URL of
-the form `https://github.com/<OWNER>/<REPO>/<PATH_TO_FILE>`.
-No other format is accepted.
+###### `GITHUB_ORG_PROFILE` :badge[optional]
+The location of your organization profile, if in use. This should be a URL of
+the form `https://github.com/<OWNER>/<REPO>/<PATH_TO_FILE>`.
+No other format is accepted.

Ensure that any updates align with the general tone and terminology used throughout the documentation.

🧰 Tools
🪛 LanguageTool

[uncategorized] ~126-~126: Loose punctuation mark.
Context: ...anisation. ###### GITHUB_ORG_PROFILE :badge[optional] The location of your or...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~128-~128: Do not mix variants of the same word (‘organisation’ and ‘organization’) within a single text.
Context: ... :badge[optional] The location of your organisation profile, if in use. This should be a UR...

(EN_WORD_COHERENCY)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 19fe658 and 36cc4b0.

📒 Files selected for processing (1)
  • src/content/docs/reference/configuration.md (2 hunks)
🧰 Additional context used
🪛 LanguageTool
src/content/docs/reference/configuration.md

[uncategorized] ~126-~126: Loose punctuation mark.
Context: ...anisation. ###### GITHUB_ORG_PROFILE :badge[optional] The location of your or...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~128-~128: Do not mix variants of the same word (‘organisation’ and ‘organization’) within a single text.
Context: ... :badge[optional] The location of your organisation profile, if in use. This should be a UR...

(EN_WORD_COHERENCY)

Add documentation around org profile structure and behaviour
@liamstevens liamstevens force-pushed the docs/update-contribution-requirements branch from 36cc4b0 to dbd43a5 Compare March 27, 2025 01:01
Copy link

@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 (5)
src/content/docs/reference/organization-profile.md (5)

6-8: Improve Sentence Flow in Introduction
Consider adding a comma to enhance readability. For example, "Organization profiles are a way to facilitate cross-repository access for pipelines, as well as managing the permissions provided by the tokens that Chinmina Bridge creates."

🧰 Tools
🪛 LanguageTool

[uncategorized] ~6-~6: Possible missing comma found.
Context: ...facilitate cross-repository access for pipelines as well as managing the permissions pro...

(AI_HYDRA_LEO_MISSING_COMMA)


10-18: Tip Box Clarity and Consistency
The tip box clearly explains the usage of the GITHUB_ORG_PROFILE environment variable. However, there is an inconsistency in branding where the text refers to "Chinmina Bridge" on one line and "Chinimina" on another. Ensure the product name is used consistently throughout to avoid confusion.


24-31: YAML Code Block Indentation
The YAML snippet provides a useful example. For improved clarity, consider standardizing the indentation style (e.g., 2 spaces vs. 4 spaces) to match common YAML practices.


48-52: Repositories Field Explanation Enhancement
Consider merging the description lines for the repositories field into a single, cohesive sentence. This can enhance readability; for example, "A list of repositories that the profile has access to, including only the repository name and excluding the owner or organization name."


60-76: YAML Example Consistency
The provided YAML example is comprehensive. Note that its indentation (using 2 spaces) differs from the earlier YAML snippet (which uses 4 spaces). Standardizing the indentation across examples would improve consistency and clarity.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 36cc4b0 and dbd43a5.

📒 Files selected for processing (2)
  • src/content/docs/reference/configuration.md (3 hunks)
  • src/content/docs/reference/organization-profile.md (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/content/docs/reference/configuration.md
🧰 Additional context used
🪛 LanguageTool
src/content/docs/reference/organization-profile.md

[uncategorized] ~6-~6: Possible missing comma found.
Context: ...facilitate cross-repository access for pipelines as well as managing the permissions pro...

(AI_HYDRA_LEO_MISSING_COMMA)

🔇 Additional comments (7)
src/content/docs/reference/organization-profile.md (7)

1-4: Front Matter Format: Looks Good
The YAML front matter is correctly formatted with the title and description, ensuring clarity for the document metadata.


20-23: Organization Profile Structure Section: Approved
The section that introduces the YAML structure is clear and informative. It effectively outlines what users can expect in the organization profile configuration.


33-39: Field Definition for organization: Approved
The description of the organization field is succinct and clear, accurately conveying its purpose in the configuration.


40-47: Profiles Field Definition: Approved
The explanation for the profiles section—including the name field—is clear and provides the necessary detail.


53-57: Permissions Field Definition: Approved
The description for the permissions field is precise, and the reference to GitHub's token documentation provides valuable context.


58-59: Example Section Heading: Approved
The "Example" section is clearly marked, signaling to users that a practical configuration example follows.


78-78: Reference Link: Approved
The reference link to the GitHub token permissions documentation is correctly included and offers useful supplemental information.

Copy link

@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 (4)
src/content/docs/contributing/development.mdx (1)

43-54: Enhance Clarity in Environment Variable Description

The added section on forwarding environment variables for Buildkite Agent containers is clear. However, the sentence on lines 43–46 could be made more concise. For example, instead of:

"These will require the following environment variables to be forwarded in order to run correctly:"

consider simplifying to:

"These Buildkite Agent containers require the following environment variables:"

This change improves readability without sacrificing context.

🧰 Tools
🪛 LanguageTool

[style] ~45-~45: Consider a shorter alternative to avoid wordiness.
Context: ...g environment variables to be forwarded in order to run correctly: ###### `BUILDKITE_AGENT...

(IN_ORDER_TO_PREMIUM)

src/content/docs/reference/organization-profile.md (3)

6-9: Refine Sentence Structure for Better Readability

The opening sentence could be tightened for clarity. Consider revising:

"Organization profiles are a way to facilitate cross-repository access for pipelines as well as managing the permissions provided by the tokens that Chinmina Bridge creates."

to something like:

"Organization profiles facilitate cross-repository access and manage the permissions provided by Chinmina Bridge tokens."

This revision improves clarity and addresses the potential punctuation concern.

🧰 Tools
🪛 LanguageTool

[uncategorized] ~6-~6: Possible missing comma found.
Context: ...facilitate cross-repository access for pipelines as well as managing the permissions pro...

(AI_HYDRA_LEO_MISSING_COMMA)


10-14: Simplify Description of Profile Usage

The phrase "need to use organization profiles in order to provide access to non-public repositories" is a bit wordy. A more concise version such as "need organization profiles to access non-public repositories" would improve readability.

🧰 Tools
🪛 LanguageTool

[style] ~11-~11: Consider a shorter alternative to avoid wordiness.
Context: ... will need to use organization profiles in order to provide access to non-public repositori...

(IN_ORDER_TO_PREMIUM)


25-36: Validate YAML Example Indentation

The YAML snippet illustrating the organization profile structure is very helpful. To ensure maximum clarity, consider revising the indentation to follow common YAML conventions. For example:

-organization:
-    profiles:
-        - name: "<profile-name>"
-            repositories: 
-                - "<repository-name>"
-            permissions: ["<permission>"]
+organization:
+  profiles:
+    - name: "<profile-name>"
+      repositories:
+        - "<repository-name>"
+      permissions: ["<permission>"]

This formatting provides clearer visual hierarchy in the example.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between dbd43a5 and aab20ce.

📒 Files selected for processing (3)
  • src/content/docs/contributing/development.mdx (2 hunks)
  • src/content/docs/reference/configuration.md (2 hunks)
  • src/content/docs/reference/organization-profile.md (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/content/docs/reference/configuration.md
🧰 Additional context used
🪛 LanguageTool
src/content/docs/contributing/development.mdx

[style] ~45-~45: Consider a shorter alternative to avoid wordiness.
Context: ...g environment variables to be forwarded in order to run correctly: ###### `BUILDKITE_AGENT...

(IN_ORDER_TO_PREMIUM)

src/content/docs/reference/organization-profile.md

[uncategorized] ~6-~6: Possible missing comma found.
Context: ...facilitate cross-repository access for pipelines as well as managing the permissions pro...

(AI_HYDRA_LEO_MISSING_COMMA)


[style] ~11-~11: Consider a shorter alternative to avoid wordiness.
Context: ... will need to use organization profiles in order to provide access to non-public repositori...

(IN_ORDER_TO_PREMIUM)

🔇 Additional comments (3)
src/content/docs/contributing/development.mdx (1)

81-83: Clear Explanation of Buildkite Agent Operations

The description detailing how Buildkite agents process jobs and authenticate to GitHub, along with the mention of Jaeger telemetry, is clear and useful. No further changes are needed here.

src/content/docs/reference/organization-profile.md (2)

1-4: Front Matter Verification

The front matter (title and description) is appropriately defined. Ensure that the casing of the title ("Organization profiles") remains consistent with other documentation if needed.


63-81: Comprehensive Example YAML Configuration

The example provided from lines 63–81 effectively demonstrates how to configure multiple organization profiles with different access levels. The inclusion of comments and the description of wildcard usage enhances its clarity.

@liamstevens liamstevens merged commit b1d7688 into main Mar 31, 2025
1 check 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.

2 participants