-
-
Notifications
You must be signed in to change notification settings - Fork 230
ENH: Auto Populate Changelog #919
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
Open
Malmahrouqi3
wants to merge
37
commits into
RocketPy-Team:develop
Choose a base branch
from
Malmahrouqi3:enh/populate-changelog
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
37 commits
Select commit
Hold shift + click to select a range
fb44b01
Create changelog.yml for release drafting
Malmahrouqi3 6c34705
new workflow
d953f71
Change branch reference for changelog update
Malmahrouqi3 4c018b9
Update auto-assign.yml
Malmahrouqi3 a8d4bd3
Merge pull request #2 from Malmahrouqi3/changelog-update-5
Malmahrouqi3 9a7a4cd
Fix typo in changelog.yml conditional statement
Malmahrouqi3 dac3ae2
Update README with main features section
Malmahrouqi3 3649d29
Merge pull request #3 from Malmahrouqi3/changelog-update-5
Malmahrouqi3 bf7c48d
docs: update changelog for PR #3
github-actions[bot] 2581538
Enhance community section in README
Malmahrouqi3 f546674
Merge pull request #4 from Malmahrouqi3/changelog-update-2
Malmahrouqi3 313f077
docs: update changelog for PR #4
github-actions[bot] c6fb2f9
Update README with RocketPy import example
Malmahrouqi3 3ceee29
Merge pull request #5 from Malmahrouqi3/changelog-update-4
Malmahrouqi3 3722283
docs: update changelog for PR #5
github-actions[bot] f3a6387
Fix typo in changelog commit message
Malmahrouqi3 0459771
Update .gitignore
Malmahrouqi3 fe67255
Merge pull request #6 from Malmahrouqi3/changelog-update-3
Malmahrouqi3 e9370ed
DOC: Ipdate Changelog for PR #6
github-actions[bot] cd9e3ed
Fix typo in changelog commit message
Malmahrouqi3 7618d5e
Add branch filter for changelog workflow
Malmahrouqi3 4ef3d5b
Update README with aerodynamic models section
Malmahrouqi3 09400af
Change target branch for pull request workflow
Malmahrouqi3 b57bded
Merge pull request #7 from Malmahrouqi3/changelog-update-3
Malmahrouqi3 6a90395
DOC: Update Changelog for PR #7
github-actions[bot] 581f82a
updating new things
9482736
Remove floating point precision fix entry from CHANGELOG
Malmahrouqi3 644e8c1
re-org
1a45e18
Few adjustments to work on the base repo, develop branch.
Malmahrouqi3 c7e7f68
new changes
b5c8a5e
restored stuff
576e273
doc changes
b114688
updated changelog for this PR
a34a0fd
updated changelog
8b5021a
Merge branch 'develop' into enh/populate-changelog
Malmahrouqi3 d152aad
PR # included in changelog
Malmahrouqi3 c932654
DOC: clearer words and corrected grammar
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,59 @@ | ||
| name: Populate Changelog | ||
| on: | ||
| pull_request: | ||
| types: [closed] | ||
| branches: | ||
| - develop | ||
|
|
||
| jobs: | ||
| Changelog: | ||
| if: github.event.pull_request.merged == true | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Clone RocketPy | ||
| uses: actions/checkout@main | ||
Malmahrouqi3 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| with: | ||
| repository: RocketPy-Team/RocketPy | ||
| ref: develop | ||
| token: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
| - name: Update Changelog | ||
| env: | ||
| PR_TITLE: ${{ github.event.pull_request.title }} | ||
| PR_NUMBER: ${{ github.event.pull_request.number }} | ||
| PR_LABELS: ${{ join(github.event.pull_request.labels.*.name, ',') }} | ||
| run: | | ||
| SECTION="### Added" | ||
| PREFIX="ENH" | ||
|
|
||
| if [[ "$PR_LABELS" == *"Bug"* ]]; then | ||
| SECTION="### Fixed" | ||
| PREFIX="BUG" | ||
| elif [[ "$PR_LABELS" == *"Refactor"* ]]; then | ||
| SECTION="### Changed" | ||
| PREFIX="MNT" | ||
| elif [[ "$PR_LABELS" == *"Docs"* ]] && [[ "$PR_LABELS" == *"Git housekeeping"* ]]; then | ||
| SECTION="### Changed" | ||
| PREFIX="DOC" | ||
| elif [[ "$PR_LABELS" == *"Tests"* ]]; then | ||
| SECTION="### Changed" | ||
| PREFIX="TST" | ||
| elif [[ "$PR_LABELS" == *"Docs"* ]]; then | ||
| # Only documentation -> Added section | ||
| SECTION="### Added" | ||
| PREFIX="DOC" | ||
Malmahrouqi3 marked this conversation as resolved.
Show resolved
Hide resolved
Malmahrouqi3 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| fi | ||
|
|
||
| ENTRY="- $PREFIX: $PR_TITLE [#$PR_NUMBER](https://github.com/RocketPy-Team/RocketPy/pull/$PR_NUMBER)" | ||
| SECTION_LINE=$(grep -n "^$SECTION$" CHANGELOG.md | head -1 | cut -d: -f1) | ||
|
|
||
Malmahrouqi3 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| sed -i "$((SECTION_LINE + 1))a\\$ENTRY" CHANGELOG.md | ||
Malmahrouqi3 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| - name: Push Changes | ||
| run: | | ||
| git config user.name "github-actions[bot]" | ||
| git config user.email "github-actions[bot]@users.noreply.github.com" | ||
| git add CHANGELOG.md | ||
| git commit -m "DOC: Update Changelog for PR #${{ github.event.pull_request.number }}" | ||
| git push | ||
Malmahrouqi3 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.