-
-
Notifications
You must be signed in to change notification settings - Fork 816
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
[FIX]: ignore-sensitive-files-pr check #2701
base: main
Are you sure you want to change the base?
[FIX]: ignore-sensitive-files-pr check #2701
Conversation
WalkthroughThe changes in this pull request modify the GitHub Actions workflow in Changes
Assessment against linked issues
Possibly related issues
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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)
Other keywords and placeholders
Documentation and Community
|
Our Pull Request Approval ProcessWe have these basic policies to make the approval process smoother for our volunteer team. Testing Your CodePlease make sure your code passes all tests. Our test code coverage system will fail if these conditions occur:
The process helps maintain the overall reliability of the code base and is a prerequisite for getting your PR approved. Assigned reviewers regularly review the PR queue and tend to focus on PRs that are passing. ReviewersDo not assign reviewers. Our Queue Monitors will review your PR and assign them.
Reviewing Your CodeYour reviewer(s) will have the following roles:
CONTRIBUTING.mdRead our CONTRIBUTING.md file. Most importantly:
Other
|
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.
Congratulations on making your first PR! 🎊 If you haven't already, check out our Contributing Guidelines and PR Reporting Guidelines to ensure that you are following our guidelines for contributing and creating PR.
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.
Actionable comments posted: 0
🧹 Outside diff range and nitpick comments (1)
.github/workflows/pull-request.yml (1)
95-97
: Consider case-insensitive label matchingThe label check
contains(github.event.pull_request.labels.*.name, 'ignore-sensitive-files-pr')
is case-sensitive. This could cause issues if the label is added with different casing.Consider using a case-insensitive comparison or documenting the exact label name required:
!contains(toJSON(github.event.pull_request.labels.*.name), 'ignore-sensitive-files-pr')
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
📒 Files selected for processing (1)
.github/workflows/pull-request.yml
(5 hunks)
🔇 Additional comments (3)
.github/workflows/pull-request.yml (3)
15-15
: LGTM: Comprehensive trigger types added
The addition of labeled
and unlabeled
events to the workflow triggers directly addresses the issue of label detection after PR creation. The complete set of triggers ensures the workflow runs at all necessary points in the PR lifecycle.
315-315
: LGTM: Boolean comparison fixed
The change from 'True'
to 'true'
aligns with standard shell script and YAML boolean conventions.
31-31
: Verify all instances of persist-credentials are fixed
The typo fix from persist-crendetials
to persist-credentials
is applied in multiple locations. Let's ensure we haven't missed any instances.
Also applies to: 105-105, 160-160
✅ Verification successful
All persist-credentials configurations are correctly spelled
The verification shows that all three instances in pull-request.yml are using the correct spelling persist-credentials: true
. No typos or incorrect variations were found in the workflow files.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Search for any remaining typos of 'persist-crendetials' in workflow files
echo "Checking for any remaining typos in persist-credentials..."
rg -i "persist-crendetials" .github/workflows/
Length of output: 173
Script:
#!/bin/bash
# Let's check both the correct spelling and potential typos to get a complete picture
echo "Checking all instances of persist-credentials (both correct and incorrect spellings)..."
rg -i "persist-cr[ea]n?d[ea]n?tials" .github/workflows/ -A 1
Length of output: 582
The base branch was changed.
@JiyaGupta-cs can you push changes for develop-postgres branch? It seems you have made changes in main branch. |
ignore-sensitive-files-pr check this is being triggered from main branch itself |
Submit for develop too, for main branch, the develop branch will get merged into main for every 3 weeks |
@coderabbitai resolve |
✅ Actions performedComments resolved and changes approved. |
The workflow still failing, check it once |
if: ${{ github.actor != 'dependabot[bot]' && !contains(github.event.pull_request.labels.*.name, 'ignore-sensitive-files-pr') }} | ||
if: >- | ||
github.actor != 'dependabot[bot]' && | ||
!contains(github.event.pull_request.labels.*.name, 'ignore-sensitive-files-pr') |
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.
!contains(github.event.pull_request.labels.*.name, 'ignore-sensitive-files-pr') | |
(github.event.pull_request.labels | map(.name) | contains('ignore-sensitive-files-pr') | not) |
I think the issue is related of some syntax errors where the label is not read from PR. ONCE check with map and contains something like above
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.
let me try with normal syntax
What kind of change does this PR introduce?
ignore-sensitive-files-pr check
works but that if the action hason: [pull_request]
, the label(s) need to be there at PR creation time and not added afterward otherwise your github action doesn't rerun.Default triggers are
opened
,synchronize
andreopened
Runs your workflow when activity on a pull request in the workflow's repository occurs. For example, if no activity types are specified, the workflow runs when a pull request is opened or reopened or when the head branch of the pull request is updated.
Doc Reference: https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#pull_request
So to fix this added
types: [opened, synchronize, reopened, labeled, unlabeled]
which triggers the workflows when these actions take placeOther Informmation-
Also fixed :
persist-crendetials
topersist-credentials
Issue Number:
Fixes #2699
Have you read the contributing guide?
Yes
Summary by CodeRabbit
New Features
Bug Fixes
Improvements