-
-
Notifications
You must be signed in to change notification settings - Fork 82
[ci] Added automated backport workflow #285
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
base: master
Are you sure you want to change the base?
Changes from all commits
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,43 @@ | ||
| name: Backport fixes to stable branch | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - master | ||
| issue_comment: | ||
| types: [created] | ||
|
|
||
| concurrency: | ||
| group: backport-${{ github.workflow }}-${{ github.ref }} | ||
| cancel-in-progress: false | ||
|
|
||
| permissions: | ||
| contents: write | ||
| pull-requests: write | ||
|
|
||
| jobs: | ||
| backport-on-push: | ||
| if: github.event_name == 'push' | ||
| uses: openwisp/openwisp-utils/.github/workflows/reusable-backport.yml@master | ||
| with: | ||
| commit_sha: ${{ github.sha }} | ||
| secrets: | ||
| app_id: ${{ secrets.OPENWISP_BOT_APP_ID }} | ||
| private_key: ${{ secrets.OPENWISP_BOT_PRIVATE_KEY }} | ||
|
|
||
| backport-on-comment: | ||
| if: > | ||
| github.event_name == 'issue_comment' && | ||
| github.event.issue.pull_request && | ||
| github.event.issue.pull_request.merged_at != null && | ||
| github.event.issue.state == 'closed' && | ||
|
Comment on lines
+29
to
+33
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. 🧩 Analysis chain🌐 Web query:
💡 Result: For a GitHub Actions workflow triggered by What
|
||
| contains(fromJSON('["MEMBER", "OWNER"]'), github.event.comment.author_association) && | ||
| startsWith(github.event.comment.body, '/backport') | ||
| uses: openwisp/openwisp-utils/.github/workflows/reusable-backport.yml@master | ||
| with: | ||
| pr_number: ${{ github.event.issue.number }} | ||
| comment_body: ${{ github.event.comment.body }} | ||
| secrets: | ||
| app_id: ${{ secrets.OPENWISP_BOT_APP_ID }} | ||
| private_key: ${{ secrets.OPENWISP_BOT_PRIVATE_KEY }} | ||
|
|
||
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.
🧩 Analysis chain
🏁 Script executed:
Repository: openwisp/openwisp-network-topology
Length of output: 1756
🏁 Script executed:
Repository: openwisp/openwisp-network-topology
Length of output: 1756
Pin reusable workflow references to immutable commit SHAs (not
@master).Using mutable refs like
@masteron lines 21 and 36 weakens supply-chain safety and introduces non-deterministic CI behavior. Pin each reference to a specific commit SHA from theopenwisp/openwisp-utilsrepository.🤖 Prompt for AI Agents