-
-
Notifications
You must be signed in to change notification settings - Fork 91
[feature] Add changelog bot #496
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
Changes from 3 commits
60ae8de
60c3e17
5b642cf
63d4072
2171e3a
c8401e5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| 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 | ||
| contents: read | ||
| pull-requests: write | ||
| issues: write | ||
|
|
||
| env: | ||
| FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This does not reflect what we have in the docs on openwisp-utils, why is it needed?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @pushpitkamboj see: https://github.com/actions/download-artifact/releases There's new releases which ship the following:
Hence it seems this is not needed anymore in both.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ohkay, its a good news then, I will quickly remove these from this pr and also fix in other repos as well. |
||
|
|
||
| jobs: | ||
| fetch-metadata: | ||
| runs-on: ubuntu-latest | ||
| if: github.event.workflow_run.conclusion == 'success' | ||
| outputs: | ||
| pr_number: ${{ steps.metadata.outputs.pr_number }} | ||
| steps: | ||
| - name: Download PR metadata | ||
| id: download | ||
| uses: actions/download-artifact@v4 | ||
|
nemesifier marked this conversation as resolved.
Outdated
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same here |
||
| 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 != '' | ||
| 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 }} | ||
|
nemesifier marked this conversation as resolved.
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| name: Changelog Bot Trigger | ||
|
|
||
| on: | ||
| pull_request_review: | ||
| types: [submitted] | ||
|
|
||
| permissions: {} | ||
|
|
||
| env: | ||
| FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same here.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we discussed about this on devs channel. actions/download-artifact@v4 depends on node20 which has been deprecated. To opt into node 24 I followed whats suggested here https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/ |
||
|
|
||
| jobs: | ||
|
coderabbitai[bot] marked this conversation as resolved.
|
||
| 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@v4 | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @pushpitkamboj update to the latest version |
||
| with: | ||
|
nemesifier marked this conversation as resolved.
|
||
| name: changelog-metadata | ||
| path: pr_number | ||
Uh oh!
There was an error while loading. Please reload this page.