Skip to content

Commit

Permalink
chore: Add templates for PRs and automated release notes (#3381)
Browse files Browse the repository at this point in the history
* Add PR template

* Improve message

* Standardize issue/pr templates

* Fix typos

* Add template for release notes

* Change name to lower case

* Add workflow for checking the PR title

* Capitalize titile

Co-authored-by: Stefan Binder <[email protected]>

* Switch to issue forms

* Refine pr text

---------

Co-authored-by: Stefan Binder <[email protected]>
  • Loading branch information
joelostblom and binste authored Mar 30, 2024
1 parent d5b0736 commit 51aa57f
Show file tree
Hide file tree
Showing 7 changed files with 108 additions and 31 deletions.
16 changes: 0 additions & 16 deletions .github/ISSUE_TEMPLATE/bug-report.md

This file was deleted.

34 changes: 34 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Bug report
description: Report something that is broken
labels: ["bug"]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this bug report!
Note that since Altair is a Python wrapper around the Vega-Lite visualization grammar, [most bugs should be reported directly to Vega-Lite](https://github.com/vega/vega-lite/issues). You can click the Action Button (`...`) of your Altair chart and "Open in Vega Editor" to see if you get the same error in the Vega Editor.
If you can't reproduce the bug in the Vega Editor, then make sure you are using [the latest version of Altair](https://github.com/altair-viz/altair/releases) and search for duplicate issues before filling out the form below.
- type: textarea
id: what-happened
attributes:
label: What happened?
description: |
Describe what happened and how to reproduce the bug.
Include the full code and data to reproduce it. Use a simple toy data set, e.g. from `vega_datasets`.
validations:
required: true
- type: textarea
id: desired-behavior
attributes:
label: What would you like to happen instead?
description: Describe the expected/desired behavior.
- type: input
id: altair-version
attributes:
label: Which version of Altair are you using?
description: Use `alt.__version__` to find out
- type: markdown
attributes:
value: By submitting this issue, you agree to follow our [Code of Conduct](../../CODE_OF_CONDUCT.md).
15 changes: 0 additions & 15 deletions .github/ISSUE_TEMPLATE/feature-request.md

This file was deleted.

26 changes: 26 additions & 0 deletions .github/ISSUE_TEMPLATE/feature-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Feature request
description: Suggest an improvement
labels: ["enhancement"]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to suggest a new feature!
Note that since Altair is a Python wrapper around the Vega-Lite visualization grammar, [most feature requests should be reported directly to Vega-Lite](https://github.com/vega/vega-lite/issues). You can click the Action Button (`...`) of your Altair chart and "Open in Vega Editor" to see the Vega-Lite chart specification.
If you believe this feature is more relevant for Altair than Vega-Lite, then make sure to search for duplicate issues before filling out the form below.
- type: textarea
id: what-happened
attributes:
label: What is your suggestion?
description: Describe the feature's goal, motivating use cases, and its expected behavior.
validations:
required: true
- type: textarea
id: alternative-solutions
attributes:
label: Have you considered any alternative solutions?
- type: markdown
attributes:
value: By submitting this issue, you agree to follow our [Code of Conduct](../../CODE_OF_CONDUCT.md).
11 changes: 11 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!-- Click "Preview" to read this message; then delete it. -->

Thanks for contributing to Altair!

Please follow these guidelines when submitting your PR:

- Describe the purpose of the changes in PR, so that it is easy to understand the implication of the suggested changes.
- Here is a [helpful article about writing effective PR descriptions](https://medium.com/@greenberg/writing-pull-requests-your-coworkers-might-enjoy-reading-9d0307e93da3).
- Include unit tests and documentation for new features
- Ensure that the title is a concise [semantic commit message](https://www.conventionalcommits.org/) (e.g. "feat: Add `embed_options` to charts").
- Append `!` if the change is breaking (e.g. "fix!: Raise error when `embed_options` is `None`")
17 changes: 17 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
changelog:
categories:
- title: Enhancements
labels:
- enhancement
- title: Bug Fixes
labels:
- bug
- title: Maintainance
labels:
- maintainance
- title: Documentation
labels:
- documentation
- title: Other Changes
labels:
- "*"
20 changes: 20 additions & 0 deletions .github/workflows/check-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: "Lint PR"

on:
pull_request_target:
types:
- opened
- edited
- synchronize

permissions:
pull-requests: read

jobs:
main:
name: Validate PR title
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 51aa57f

Please sign in to comment.