-
Notifications
You must be signed in to change notification settings - Fork 0
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
Fixed code standared violation fixes #16
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
@@ -1,9 +1,9 @@ | ||||||||||
--- | ||||||||||
name: Bug report | ||||||||||
about: Create a report to help us improve | ||||||||||
title: '' | ||||||||||
labels: '' | ||||||||||
assignees: '' | ||||||||||
title: "[BUG] " | ||||||||||
labels: bug | ||||||||||
assignees: Sachinbisht27 | ||||||||||
|
||||||||||
--- | ||||||||||
|
||||||||||
|
@@ -12,27 +12,26 @@ A clear and concise description of what the bug is. | |||||||||
|
||||||||||
**To Reproduce** | ||||||||||
Steps to reproduce the behavior: | ||||||||||
1. Go to '...' | ||||||||||
2. Click on '....' | ||||||||||
3. Scroll down to '....' | ||||||||||
4. See error | ||||||||||
1. Set webhook payload '...' | ||||||||||
2. Trigger webhook '....' | ||||||||||
3. See the error | ||||||||||
|
||||||||||
|
||||||||||
**Expected behavior** | ||||||||||
A clear and concise description of what you expected to happen. | ||||||||||
|
||||||||||
**Screenshots** | ||||||||||
If applicable, add screenshots to help explain your problem. | ||||||||||
|
||||||||||
**Desktop (please complete the following information):** | ||||||||||
- OS: [e.g. iOS] | ||||||||||
- Browser [e.g. chrome, safari] | ||||||||||
- Version [e.g. 22] | ||||||||||
|
||||||||||
**Smartphone (please complete the following information):** | ||||||||||
- Device: [e.g. iPhone6] | ||||||||||
- OS: [e.g. iOS8.1] | ||||||||||
- Browser [e.g. stock browser, safari] | ||||||||||
- Version [e.g. 22] | ||||||||||
**Environment (please complete the following information):** | ||||||||||
- Webhook Payload ``` here``` | ||||||||||
- Environment - Production/Staging/other | ||||||||||
Comment on lines
+27
to
+28
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Correct the indentation for unordered list items under the "Environment" section. - - Environment - Production/Staging/other
+ - Environment: Production/Staging/other Committable suggestion
Suggested change
|
||||||||||
|
||||||||||
**Additional context** | ||||||||||
Add any other context about the problem here. | ||||||||||
|
||||||||||
**Acceptance Criteria** | ||||||||||
Add acceptance criteria here. | ||||||||||
|
||||||||||
**Documentation** | ||||||||||
Add whatever documentation will be required here. |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,37 @@ | ||||||
<!-- Pull Request Title Guidelines --> | ||||||
<!-- | ||||||
Please follow the format: #<issue_id> <Title> | ||||||
- <issue_id>: Id of the issue for which the PR belongs to (e.g., #1023) | ||||||
- <Title>: A brief summary of the change (e.g., Add user authentication functionality) | ||||||
Example of Pull Request Title: #1023 Add user authentication functionality | ||||||
--> | ||||||
|
||||||
#[ISSUE_ID] | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The ATX-style heading should have a space after the hash for proper markdown formatting. This ensures the text is correctly rendered as a heading. - #[ISSUE_ID]
+ # [ISSUE_ID] Committable suggestion
Suggested change
|
||||||
<!--- If there is an open issue, please link to the issue here by replacing [ISSUE_ID]--> | ||||||
<!-- Make sure the PR is against the `develop` branch --> | ||||||
|
||||||
### Please complete the following steps and check these boxes before filing your PR: | ||||||
|
||||||
|
||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Multiple consecutive blank lines found. This could be a typographical error and should be reduced to a single blank line to maintain consistency and readability. - Committable suggestion
Suggested change
|
||||||
### Types of changes | ||||||
<!--- What types of changes does your code introduce? --> | ||||||
- [ ] Bug fix (a change which fixes an issue) | ||||||
- [ ] New feature (a change which adds functionality) | ||||||
|
||||||
|
||||||
### Short description of what this resolves: | ||||||
<!--- Describe your changes in detail --> | ||||||
<!--- Why these change required? What problem does it solve? --> | ||||||
|
||||||
|
||||||
### Checklist: | ||||||
<!--- Mark the checkboxes accordingly. --> | ||||||
<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> | ||||||
- [ ] I have performed a self-review of my own code. | ||||||
- [ ] The code follows the style guidelines of this project. | ||||||
- [ ] The code changes are passing the CI checks | ||||||
- [ ] I have documented my code wherever required. | ||||||
- [ ] The changes requires a change to the documentation. | ||||||
- [ ] I have updated the documentation based on the my changes. | ||||||
- [ ] I have added tests to cover my changes (if not applicable, please state why) | ||||||
- [ ] All new and existing tests are passing. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
name: pre-commit | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- develop | ||
- main | ||
jobs: | ||
pre-commit: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v3 | ||
- uses: pre-commit/[email protected] |
Original file line number | Diff line number | Diff line change | ||||||
---|---|---|---|---|---|---|---|---|
|
@@ -51,6 +51,9 @@ def _parse_interval(self, alert_data): | |||||||
) | ||||||||
return interval.strftime("%Y-%m-%d %H:%M") | ||||||||
|
||||||||
if notify: | ||||||||
self.insert_new_threshold(cost, budget, budget_name, threshold) | ||||||||
Comment on lines
+54
to
+55
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Undefined variables - if notify:
- self.insert_new_threshold(cost, budget, budget_name, threshold)
+ # Ensure all variables are defined before use or remove this conditional if not needed Committable suggestion
Suggested change
|
||||||||
|
||||||||
def _is_current_month(self, interval_str): | ||||||||
"""Checks if the interval falls within the current month.""" | ||||||||
current_year_month = datetime.datetime.utcnow().strftime("%Y-%m") | ||||||||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -25,5 +25,5 @@ def send_alert(self, slack_block): | |||||
logger.info("Alert Sent") | ||||||
return True | ||||||
except Exception as e: | ||||||
logger.error(f"Exception occurred:{e}") | ||||||
logger.error(f"Exception occurred:{e}. Response: {response}") | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Undefined variable - logger.error(f"Exception occurred:{e}. Response: {response}")
+ logger.error(f"Exception occurred:{e}") Committable suggestion
Suggested change
|
||||||
return False |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ensure lists in markdown are surrounded by blank lines for proper rendering.
Committable suggestion