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

Added fetching of labels marked as incidents #9

Merged
merged 11 commits into from
Aug 6, 2024
Merged

Added fetching of labels marked as incidents #9

merged 11 commits into from
Aug 6, 2024

Conversation

Bullrich
Copy link
Owner

@Bullrich Bullrich commented Aug 6, 2024

Added the ability to fetch labels on the cron job and add them to a new array named incidents.

Restructured the report file (and renamed the file to stop it from causing problems).

Updated the interface to show the new incidents using a timeline.

Prettified the footer

Summary by CodeRabbit

  • New Features

    • Introduced IncidentManager class for managing GitHub incidents.
    • Added a new Svelte component to display recent incidents in a timeline format.
    • Enhanced page functionality with conditional rendering of incidents.
    • Expanded data retrieval capabilities with the addition of incident loading functions.
  • Improvements

    • Updated artifact and incident handling to streamline processes.
    • Enhanced layout of the component footer for better user experience.
    • Improved the data structure for incident tracking and reporting.
  • Bug Fixes

    • Refined artifact management methods for better performance and accuracy.
    • Modified test case structures to accommodate new data formats.

@Bullrich Bullrich self-assigned this Aug 6, 2024
Copy link

coderabbitai bot commented Aug 6, 2024

Walkthrough

The recent changes enhance system functionality by introducing the IncidentManager class, refining report and artifact management, and reorganizing data outputs. A new Svelte component displays incidents, while the JSON structure has been updated for better separation of incidents and site information. Collectively, these updates streamline incident tracking and reporting, offering users a more comprehensive overview.

Changes

File Change Summary
.github/workflows/deploy-site.yml Renamed ARTIFACT_NAME to reports; expanded get-metrics job permissions to include issues: read.
log/.gitignore Renamed report.json and report.zip to reports.json and reports.zip.
log/src/github/artifact.ts Updated getPreviousArtifact and generateArtifact method signatures for clearer artifact handling.
log/src/github/incidents.ts Introduced IncidentManager to manage and retrieve incidents from GitHub issues.
log/src/index.ts Added IncidentManager import and modified run function to handle incidents alongside artifacts.
log/src/test/index.test.ts Revised siteResult type and population to align with new structure.
src/lib/components/Incidents.svelte Added a new component to display incidents in a timeline format.
src/lib/logs.json Restructured to include incidents and site sections for clearer data organization.
src/lib/metrics/index.ts Modified loadStatusReport and added loadIncidents function for enhanced reporting.
src/lib/types.ts Updated ReportFile interface to include site and incidents properties.
src/routes/+layout.svelte Adjusted footer styling for improved user experience.
src/routes/+page.svelte Added conditional rendering for the new Incidents component.
src/routes/+page.ts Enhanced load function to include incident data retrieval.
tests/test.ts Changed report structure from an array to an object with nested properties for detailed reporting.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant Incidents
    participant ReportSystem
    participant GitHubAPI

    User->>ReportSystem: Request report
    ReportSystem->>GitHubAPI: Fetch incidents
    GitHubAPI-->>ReportSystem: Return incidents data
    ReportSystem->>Incidents: Pass incidents for display
    Incidents-->>User: Show incidents timeline
Loading

🐰 In the garden, I hop with glee,
New changes sprout for all to see!
Incidents tracked, reports refined,
A brighter path for all mankind.
With data clear and structure neat,
Our coding realm is now complete! 🌼


Note

Summarized by CodeRabbit Free

Your organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login.

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>.
    • 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 generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @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 as 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 resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

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.

@Bullrich Bullrich merged commit aa10eb1 into main Aug 6, 2024
8 checks passed
@Bullrich Bullrich deleted the issues branch August 6, 2024 12:29
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