Repository: run-llama/llama_index
Pull request: Add changelog
# Description

We desperately need a changelog. This PR adds that, as well as a workflow check so that every PR should (hopefully) be added to the changelog.

I know it seems annoying, but it's a small thing that will GREATLY improve the usability of the repo.

Future work is adding a hook to display the changelog in our docs.

Not 100% if the workflow check will work yet though.

Fixes https://github.com/jerryjliu/llama_index/issues/6184

## Type of Change

- [x] New feature (non-breaking change which adds functionality)

# How Has This Been Tested?

- [x] I stared at the code and made sure it makes sense

# Suggested Checklist:

- [x] I have performed a self-review of my own code
- [x] My changes generate no new warnings


Problem statement:
[Feature Request]: Documentation to include release notes
### Feature Description

It is extremely challenging to follow up with the changes in the framework. Could you please provide release notes with every new version of llama index library released.

### Reason

_No response_

### Value of Feature

_No response_

Hints from issue discussion:
Yea, we are actively working on improving this. Expect to see improvements going forward soon!

Commit message: add step to workflow to get changed files

Patch to review:
diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml
index 2178f6b012..44dd53106e 100644
--- a/.github/workflows/lint.yml
+++ b/.github/workflows/lint.yml
@@ -16,6 +16,8 @@ jobs:
         python-version: ["3.9"]
     steps:
       - uses: actions/checkout@v3
+        with:
+          fetch-depth: ${{ github.event_name == 'pull_request' && 2 || 0 }}
       - name: Set up Python ${{ matrix.python-version }}
         uses: actions/setup-python@v4
         with:
@@ -27,4 +29,19 @@ jobs:
           pip install -r data_requirements.txt
       - name: Run linter
         run: make lint
-        
\ No newline at end of file
+      - name: Get changed files
+        id: changed-files
+        run: |
+          if ${{ github.event_name == 'pull_request' }}; then
+            echo "changed_files=$(git diff --name-only -r HEAD^1 HEAD | xargs)" >> $GITHUB_OUTPUT
+          else
+            echo "changed_files=$(git diff --name-only ${{ github.event.before }} ${{ github.event.after }} | xargs)" >> $GITHUB_OUTPUT
+          fi
+      - name: Ensure Changelog Updated
+        run: |
+          for file in ${{ steps.changed-files.outputs.changed_files }}; do 
+            if [ "${file}" == CHANGELOG.md ]; then 
+              exit 0 
+            fi 
+          done 
+          exit 1
diff --git a/CHANGELOG.md b/CHANGELOG.md
new file mode 100644
index 0000000000..e2b62fa540
--- /dev/null
+++ b/CHANGELOG.md
@@ -0,0 +1,63 @@
+# Changelog
+
+## [Unreleased]
+
+### New Features
+- None
+
+### Bug Fixes
+- None
+
+### Breaking/Deprecated API Changes
+- None
+
+### Miscellaneous 
+- Added changelog officially to github repo
+
+## [v0.6.21] - 2023-06-06
+
+### New Features
+- SimpleDirectoryReader has new `filename_as_id` flag to automatically set the doc_id (useful for `refresh_ref_docs()`)
+- DocArray vector store integration
+- Tair vector store integration
+- Weights and Biases callback handler for tracing and versioning indexes
+- Can initialize indexes directly from a vector store: `index = VectorStoreIndex.from_vector_store(vector_store=vector_store)`
+
+### Bug Fixes
+- Fixed multimodal notebook
+- Updated/fixed the SQL tutorial in the docs
+ 
+### Miscellaneous 
+- Minor docs updates
+- Added github pull-requset templates
+- Added github issue-forms
+
+## [v0.6.20] - 2023-06-04
+
+### New Features
+- Added new JSONQueryEngine that uses JSON schema to deliver more accurate JSON query answers
+- Metadata support for redis vector-store
+- Added Supabase vector store integration
+
+### Bug Fixes
+- Fixed typo in text-to-sql prompt
+
+### Breaking/Deprecated API Changes
+- Removed GPT prefix from indexes (old imports/names are still supported though)
+ 
+### Miscellaneous 
+- Major docs updates, brought important modules to the top level
+
+## [v0.6.19] - 2023-06-02
+
+### New Features
+- Added agent tool abstraction for llama-hub data loaders
+ 
+### Miscellaneous 
+- Minor doc updates
+
+## [v0.6.18] - 2023-06-02
+
+### Miscellaneous 
+- Added `Discover LlamaIndex` video series to the tutorials docs section
+- Minor docs updates


Code review comments:
diff_hunk: @@ -27,4 +29,19 @@ jobs:
           pip install -r data_requirements.txt
       - name: Run linter
         run: make lint
-        
\ No newline at end of file
+      - name: Get changed files
+        id: changed-files
+        run: |
+          if ${{ github.event_name == 'pull_request' }}; then
+            echo "changed_files=$(git diff --name-only -r HEAD^1 HEAD | xargs)" >> $GITHUB_OUTPUT
+          else
+            echo "changed_files=$(git diff --name-only ${{ github.event.before }} ${{ github.event.after }} | xargs)" >> $GITHUB_OUTPUT
+          fi
+      - name: Ensure Changelog Updated
+        run: |
+          for file in ${{ steps.changed-files.outputs.changed_files }}; do 
+            if [ "${file}" == CHANGELOG.md ]; then 
path: .github/workflows/lint.yml
text: @user1:
I wonder if this is too strict. We currently do some hotfix PRs that fixes a couple of lines in code or docs.

(I guess in principle we shouldn't do that without a changelog.) But not sure if the added friction here is really necessary.

@user1:
I think the concern here is that we'd end up with placeholder changelog lines if we really enforce every PR modifies it.

@author:
That's fair. I can remove the check, but as we just need to do a good job of policing the file at our discretion 👍

Maybe I'll add a note to to the PR template instead