-
-
Notifications
You must be signed in to change notification settings - Fork 183
[ci] Enabled bot-changelog workflow #763
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
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
7cea252
[ci] Add bot-changelog workflow
9bfb09c
Merge branch 'master' into ci/changelog_bot
pushpitkamboj 580df60
[ci] Added bot changelog
bef5451
[fix] remove old yml file
db2de77
[fix]opt for node24 for github action as node20 is depcreated
35c1c88
[fix] QA checks
de476b6
[fix] Remove js env and edited permissions for workflow
92d4870
Merge branch 'master' into ci/changelog_bot
pushpitkamboj 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,54 @@ | ||
| name: Changelog Bot Runner | ||
|
|
||
| on: | ||
| workflow_run: | ||
| workflows: ["Changelog Bot Trigger"] | ||
| types: | ||
| - completed | ||
|
|
||
| permissions: | ||
| actions: read | ||
|
|
||
| jobs: | ||
| fetch-metadata: | ||
| runs-on: ubuntu-latest | ||
| if: github.event.workflow_run.conclusion == 'success' | ||
| permissions: | ||
| actions: read | ||
| outputs: | ||
| pr_number: ${{ steps.metadata.outputs.pr_number }} | ||
| steps: | ||
| - name: Download PR metadata | ||
| id: download | ||
| uses: actions/download-artifact@v8 | ||
| with: | ||
| name: changelog-metadata | ||
| github-token: ${{ secrets.GITHUB_TOKEN }} | ||
| run-id: ${{ github.event.workflow_run.id }} | ||
| continue-on-error: true | ||
|
|
||
| - name: Read PR metadata | ||
| if: steps.download.outcome == 'success' | ||
| id: metadata | ||
| run: | | ||
| PR_NUMBER=$(cat pr_number) | ||
| if ! [[ "$PR_NUMBER" =~ ^[0-9]+$ ]]; then | ||
| echo "::error::Invalid PR number: $PR_NUMBER" | ||
| exit 1 | ||
| fi | ||
| echo "pr_number=$PR_NUMBER" >> $GITHUB_OUTPUT | ||
|
|
||
| changelog: | ||
| needs: fetch-metadata | ||
| if: needs.fetch-metadata.outputs.pr_number != '' | ||
| permissions: | ||
| contents: read | ||
| pull-requests: write | ||
| issues: write | ||
| uses: openwisp/openwisp-utils/.github/workflows/reusable-bot-changelog.yml@master | ||
| with: | ||
| pr_number: ${{ needs.fetch-metadata.outputs.pr_number }} | ||
| secrets: | ||
| GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }} | ||
| OPENWISP_BOT_APP_ID: ${{ secrets.OPENWISP_BOT_APP_ID }} | ||
| OPENWISP_BOT_PRIVATE_KEY: ${{ secrets.OPENWISP_BOT_PRIVATE_KEY }} |
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,38 @@ | ||
| name: Changelog Bot Trigger | ||
|
|
||
| on: | ||
| pull_request_review: | ||
| types: [submitted] | ||
|
|
||
| permissions: {} | ||
|
|
||
| jobs: | ||
| check: | ||
| if: | | ||
| github.event.review.state == 'approved' && | ||
| (github.event.review.author_association == 'OWNER' || | ||
| github.event.review.author_association == 'MEMBER' || | ||
| github.event.review.author_association == 'COLLABORATOR') | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Check for noteworthy PR | ||
| id: check | ||
| env: | ||
| PR_TITLE: ${{ github.event.pull_request.title }} | ||
| run: | | ||
| if echo "$PR_TITLE" | grep -qiE '^\[(feature|fix|change)\]'; then | ||
| echo "has_noteworthy=true" >> $GITHUB_OUTPUT | ||
| fi | ||
|
|
||
| - name: Save PR metadata | ||
| if: steps.check.outputs.has_noteworthy == 'true' | ||
| env: | ||
| PR_NUMBER: ${{ github.event.pull_request.number }} | ||
| run: echo "$PR_NUMBER" > pr_number | ||
|
|
||
| - name: Upload PR metadata | ||
| if: steps.check.outputs.has_noteworthy == 'true' | ||
| uses: actions/upload-artifact@v7 | ||
| with: | ||
| name: changelog-metadata | ||
| path: pr_number | ||
Oops, something went wrong.
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.
🧹 Nitpick | 🔵 Trivial
🧩 Analysis chain
🌐 Web query:
What are GitHub’s current recommendations for pinningruns-onrunner images in GitHub Actions workflows?💡 Result:
GitHub does not recommend or support directly pinning runs-on runner images to specific versions (e.g., ubuntu-24.04-20250915.62.1) in standard GitHub-hosted runners. Instead, the current recommendation is to use specific OS version labels like ubuntu-24.04, ubuntu-22.04, windows-2025, or macos-15 to avoid unexpected changes from -latest aliases, which roll forward to newer OS versions (e.g., ubuntu-latest now points to ubuntu-24.04 as of early 2025).
Citations:
20250915.62.1, so users get control over *when* image updates break their CI 🙏 actions/runner-images#13034Use a fixed runner image instead of
ubuntu-latest.ubuntu-latestis mutable and can introduce non-reproducible CI behavior. Pin to a specific OS version label likeubuntu-24.04to ensure consistency.🤖 Prompt for AI Agents