-
Notifications
You must be signed in to change notification settings - Fork 6
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
Added: Changelog Feature #61
Draft
Kille135
wants to merge
51
commits into
testnet
Choose a base branch
from
changelog-feat
base: testnet
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.
Draft
Changes from all commits
Commits
Show all changes
51 commits
Select commit
Hold shift + click to select a range
8248889
Rename Changelog to Changelog.md
Kille135 978978c
Added Changelog.yml
Kille135 491ede5
Update Changelog.yml
Kille135 8733dab
Update Changelog.yml
Kille135 3b80088
Added Changelog generation and Pull Request message validation
Kille135 44f7072
Update deploy-testnet.yml
Kille135 5d37cfb
Fixed docker image push in CI/CD workflow (#57)
Kille135 2111d3d
Update Changelog.yml
Kille135 bcff82b
Update Changelog.yml
Kille135 d128529
Update Changelog.yml
Kille135 4a89339
Added: Pull-Request title check and Changelog feature (#59)
Kille135 1aca207
Update Changelog.yml
Kille135 2f2800d
Update Changelog.yml
Kille135 04da366
Delete .github/workflows/Changelog.yml
Kille135 80b37ef
Changelog CI deleted
Kille135 bd154a0
Create changelog.yml
Kille135 7daaa9c
Update changelog.yml
Kille135 db9437c
Update changelog.yml
Kille135 2e82ccd
Update changelog.yml
Kille135 537b4e3
Update changelog.yml
Kille135 8e25e82
Update changelog.yml
Kille135 65a0a7a
Update changelog.yml
Kille135 e712e64
Update changelog.yml
Kille135 c47470b
Update changelog.yml
Kille135 a860b6a
Update changelog.yml
Kille135 7075dff
Update changelog.yml
Kille135 1f569a2
Update changelog.yml
Kille135 96b44c0
Update changelog.yml
Kille135 3b00c83
Update changelog.yml
Kille135 0c905f6
Update changelog.yml
Kille135 615e1e0
Update changelog.yml
Kille135 2c3e6f3
Update changelog.yml
Kille135 14ba853
Update changelog.yml
Kille135 19ab5d3
Update changelog.yml
Kille135 253a7b3
Update changelog.yml
Kille135 cbfd010
Update changelog.yml
Kille135 c979e6c
Update changelog.yml
Kille135 2c3a57c
Update changelog.yml
Kille135 97bdef4
Update changelog.yml
Kille135 6bcba4c
Update changelog.yml
Kille135 bfb3cf8
Update changelog.yml
Kille135 c64c3aa
Update changelog.yml
Kille135 5330043
Update changelog.yml
Kille135 7c74eb1
Update changelog.yml
Kille135 21e25c2
Update changelog.yml
Kille135 4e70f4c
Update changelog.yml
Kille135 b9d82fb
Update changelog.yml
Kille135 75f9b24
Update changelog.yml
Kille135 065bba7
Update changelog.yml
Kille135 f172fc6
Update changelog.yml
Kille135 2f8fe61
Update Changelog with changes from pull request #61
actions-user 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 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,49 @@ | ||
name: Pull Request Workflow | ||
permissions: | ||
contents: write | ||
pull-requests: write | ||
on: | ||
pull_request: | ||
types: [opened, reopened, synchronize] | ||
|
||
jobs: | ||
validate-pr: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Check PR Title Format | ||
run: | | ||
PR_TITLE=$(jq -r ".pull_request.title" "$GITHUB_EVENT_PATH") | ||
# Check if the pull request title matches the required format | ||
if ! echo "$PR_TITLE" | grep -qE '^(Added|Changed|Deprecated|Removed|Fixed|Security): .+$'; then | ||
echo "Pull request title '$PR_TITLE' does not match the required format." | ||
echo "::error::Pull request title does not match the required format." | ||
exit 1 | ||
fi | ||
|
||
- name: pull branch updates | ||
run: | | ||
git config --local user.email "[email protected]" | ||
git config --local user.name "GitHub Action" | ||
git config pull.rebase true | ||
git pull origin ${{ github.head_ref }} | ||
|
||
- name: Update Changelog | ||
if: success() | ||
run: | | ||
# Extract version and date from previous changelog entry | ||
PREVIOUS_VERSION=$(grep -oP '(?<=## \[)[^\]]+' Changelog.md | head -n 1) | ||
DATE=$(date +'%Y-%m-%d') | ||
CHANGELOG_ENTRY="**[${PREVIOUS_VERSION}] - ${DATE}**\n$(jq -r ".pull_request.title" "$GITHUB_EVENT_PATH" | sed 's/^[^:]*: //' | sed 's/^/* /')" | ||
# Update changelog file | ||
sed -i "1s/^/${CHANGELOG_ENTRY}\n\n/" Changelog.md | ||
- name: Commit and Push Changelog Update | ||
run: | | ||
git config --local user.email "[email protected]" | ||
git config --local user.name "GitHub Action" | ||
git add Changelog.md | ||
git commit -m "Update Changelog with changes from pull request #${{ github.event.number }}" | ||
git push origin HEAD:${{ github.head_ref }} |
This file contains 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 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 |
---|---|---|
@@ -1,2 +1,5 @@ | ||
**[] - 2024-04-01** | ||
* Changelog Feature | ||
|
||
[0.0.1] | ||
Here is the start of the ChangeLog |
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.
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.
The problem here that it violates our style guideline for commmit messages, particularly:
But it's ok to restrict the words list for merge commits to: "Add", "Change", "Deprecate", "Remove", "Fix". Don't know what to do about "Security". Can we remove it completely?
Also, we need to update our contributing guideline accordingly (the title of a PR can have only these words and the merge request message should be the same as the PR title).