-
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
feat: add common ci #1
base: main
Are you sure you want to change the base?
Conversation
Reviewer's Guide by SourceryThis pull request introduces a common CI configuration for pull request evaluations. It adds several GitHub Actions workflows and their corresponding action files to perform various checks on pull requests, including detecting unresolved conflicts, running pre-commit checks, and validating semantic PR titles. File-Level Changes
Tips
|
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.
Hey @JaeAeich - I've reviewed your changes and they look great!
Here's what I looked at during the review
- 🟡 General issues: 1 issue found
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟡 Documentation: 5 issues found
Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.
- main | ||
|
||
jobs: | ||
detect-unresolved-conflicts: |
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.
suggestion: Consider reordering jobs to match execution order
The detect-unresolved-conflicts
job depends on semantic-pr-check
, but semantic-pr-check
is defined later in the file. Consider reordering the jobs to match their execution order for better readability and to avoid potential issues.
semantic-pr-check:
runs-on: ubuntu-latest
detect-unresolved-conflicts:
runs-on: ubuntu-latest
needs: semantic-pr-check
readability. | ||
|
||
## Table of Contents | ||
|
||
- [Prerequisites](#prerequisites) | ||
- [Inputs](#inputs) | ||
|
||
## Prerequisites | ||
|
||
Ensure that the pull request titles follow semantic guidelines before using this | ||
action. This includes starting the PR title with one of the allowed types (e.g., |
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.
suggestion (documentation): Consider adding an example of a well-formatted PR title
This would help users understand exactly what is expected in terms of PR title formatting.
readability.
## Table of Contents
- [Prerequisites](#prerequisites)
- [Inputs](#inputs)
## Prerequisites
Ensure that the pull request titles follow semantic guidelines before using this
action. This includes starting the PR title with one of the allowed types (e.g.,
`fix`, `feat`, `docs`) and ensuring that the title does not exceed 50 characters.
Example of a well-formatted PR title:
`feat: Add user authentication system`
| Name | Description | Required | Default | | ||
|----------------|-----------------------------------------------|----------|---------| | ||
| `github_token` | The GitHub token to use for authentication | Yes | N/A | | | ||
`pr_title` | The title of the pull request | Yes | N/A | |
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.
issue (documentation): Fix alignment in the Inputs table
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.
Indeed, an opening pipe (|
) seems to be missing
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.
You're right, the missing opening pipe (|
) is causing the misalignment in the Inputs table. Adding the pipe at the beginning of the pr_title
row will fix the alignment issue. Here's how the corrected table should look:
| Name | Description | Required | Default |
|---------------|---------------------------------------------|----------|---------|
| `github_token`| The GitHub token to use for authentication | Yes | N/A |
| `pr_title` | The title of the pull request | Yes | N/A |
Feel free to update the documentation with this correction. Let me know if you need any further assistance!
|
||
| Name | Description | Required | Default | | ||
|----------------|-----------------------------------------------|----------|---------| | ||
| `github_token` | The GitHub token to use for authentication | Yes | N/A | | |
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.
suggestion (documentation): Add more information about the use of github_token
Explain briefly what operations this token allows the action to perform.
| `github_token` | The GitHub token to use for authentication | Yes | N/A | | | |
| `github_token` | GitHub token for authentication. Allows the action to create, update, and manage pull requests. | Yes | N/A | |
|
||
N/A | ||
|
||
[pcc]: https://github.com/elixir-cloud-aai/cookiecutter-python/blob/main/%7B%7B%20cookiecutter.project_name_dashed%20%7D%7D/.pre-commit-config.yaml |
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.
suggestion (documentation): Consider using a shorter reference name for the link
This would improve readability. For example, you could use '[pre-commit-config]' instead of '[pcc]'.
[pre-commit-config]: https://github.com/elixir-cloud-aai/cookiecutter-python/blob/main/%7B%7B%20cookiecutter.project_name_dashed%20%7D%7D/.pre-commit-config.yaml
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.
Not sure why it says a shorter reference name and then suggests a longer one - but I do agree that more explicit names are generally better for readability and reusability.
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.
You're right, the suggestion does seem a bit contradictory in terms of length. The key point here is about clarity and explicitness rather than just shortening the reference name. Using a more descriptive name like [pre-commit-config]
can make the documentation clearer and more intuitive, especially for those who might not be familiar with the abbreviation [pcc]
. It's about finding a balance between brevity and clarity, and in this case, a slightly longer but more descriptive name can enhance readability and understanding. Let me know if you have any other questions or need further clarification!
Configure pre-commit hooks in root directory of the repository in | ||
`.pre-commit-config.yaml` file. For example, look into [pre-commit config][pcc] |
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.
suggestion (documentation): Add a brief explanation of pre-commit hooks
This would be helpful for users who might not be familiar with the concept.
Configure pre-commit hooks in root directory of the repository in | |
`.pre-commit-config.yaml` file. For example, look into [pre-commit config][pcc] | |
Configure pre-commit hooks in the root directory of the repository using a | |
`.pre-commit-config.yaml` file. Pre-commit hooks are automated checks that run | |
before each commit, ensuring code quality and consistency. For an example | |
configuration, refer to the [pre-commit config][pcc] in the cookiecutter-python | |
repository. |
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.
Looks mostly good - don't really have anything to add outside of the Sourcery suggestions
|
||
N/A | ||
|
||
[pcc]: https://github.com/elixir-cloud-aai/cookiecutter-python/blob/main/%7B%7B%20cookiecutter.project_name_dashed%20%7D%7D/.pre-commit-config.yaml |
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.
Not sure why it says a shorter reference name and then suggests a longer one - but I do agree that more explicit names are generally better for readability and reusability.
| Name | Description | Required | Default | | ||
|----------------|-----------------------------------------------|----------|---------| | ||
| `github_token` | The GitHub token to use for authentication | Yes | N/A | | | ||
`pr_title` | The title of the pull request | Yes | N/A | |
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.
Indeed, an opening pipe (|
) seems to be missing
Summary by Sourcery
Add a common CI configuration for PR evaluations, including workflows for detecting unresolved conflicts, running pre-commit checks, and validating semantic PR titles. Include documentation for each action to guide users on their usage and configuration.
CI:
Documentation: