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

auto assign pr workflow #79

Merged
merged 1 commit into from
Nov 27, 2024
Merged

auto assign pr workflow #79

merged 1 commit into from
Nov 27, 2024

Conversation

daviinaa
Copy link
Contributor

Story: https://app.shortcut.com/smileid/story/xxx

Summary

A few sentences/bullet points about the changes

Known Issues

Any shortcomings in your work. This may include corner cases not correctly handled or issues related
to but not within the scope of your PR. Design compromises should be discussed here if they were not
already discussed above.

Test Instructions

Concise test instructions on how to verify that your feature works as intended. This should include
changes to the development environment (if applicable) and all commands needed to run your work.

Screenshot

If applicable (e.g. UI changes), add screenshots to help explain your work.

@prfectionist
Copy link

prfectionist bot commented Nov 27, 2024

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 1 🔵⚪⚪⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

Logic Error
The condition for running the workflow may not work as intended. The current check for empty assignees could prevent the workflow from running when it should.

@prfectionist
Copy link

prfectionist bot commented Nov 27, 2024

PR Code Suggestions ✨

Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Score
Possible bug
Fix incorrect condition for checking if a pull request has no assignees

The condition !contains(github.event.pull_request.assignees, '') will always
evaluate to true since an empty string is never in the assignees array. To check if
the PR has no assignees, use github.event.pull_request.assignees.length == 0.

.github/workflows/auto-author-assign.yml [13]

-if: ${{ !contains(github.event.pull_request.assignees, '') }}
+if: ${{ github.event.pull_request.assignees.length == 0 }}
Suggestion importance[1-10]: 9

Why: The current condition is logically incorrect and will always evaluate to true, which could cause the workflow to run unnecessarily. The suggested fix properly checks for empty assignees array, which is critical for the auto-assign functionality to work as intended.

9

Copy link

@beastawakens beastawakens left a comment

Choose a reason for hiding this comment

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

@daviinaa daviinaa merged commit 7ab6315 into main Nov 27, 2024
6 checks passed
@daviinaa daviinaa deleted the feature/autoassign branch November 27, 2024 11:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants