Skip to content

Commit 0915af6

Browse files
Replace backport workflow. (#5125)
[SC-49830](https://app.shortcut.com/tiledb-inc/story/49830/the-backport-workflow-consistently-fails-to-run) Due to [longstanding issues with the backport workflow](https://github.com/TileDB-Inc/TileDB/issues?q=is%3Aissue+failed+to+backport), it is time to move away from it, and this PR replaces it with the battle-tested backport workflow used by the .NET project. This has been made possible by dotnet/arcade#14034 which adds support for the workflow to be used from repositories outside of the `dotnet` or `microsoft` organizations. One significant difference lies within the workflow's triggering method. Whereas the old workflow triggers by adding a `backport` label in a closed pull request, the new workflow triggers by commenting `/backport to <branch>` in the pull request. I personally consider this to be better, since posting a comment is a more explicit action that applying a label, and we can still use the labels for reminding ourselves. To validate that only authorized users can trigger it, the workflow requires that those using it have their `TileDB-Inc` organization membership set to public. You can change that from [the organization's members page](https://github.com/orgs/TileDB-Inc/people). If backporting fails, the new workflow will post a comment on the PR instead of opening a new issue. --- TYPE: NO_HISTORY
1 parent e660107 commit 0915af6

File tree

1 file changed

+21
-25
lines changed

1 file changed

+21
-25
lines changed

.github/workflows/backport.yml

Lines changed: 21 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,26 @@
11
name: Backport
22
on:
3-
pull_request_target:
4-
types:
5-
- closed
6-
- labeled
7-
paths-ignore:
8-
- '_quarto.yml'
9-
- 'quarto-materials/*'
10-
- '**/.md'
3+
issue_comment:
4+
types: [created]
5+
schedule:
6+
# once a day at 13:00 UTC to cleanup old runs
7+
- cron: '0 13 * * *'
8+
9+
permissions:
10+
contents: write
11+
issues: write
12+
pull-requests: write
13+
actions: write
1114

1215
jobs:
1316
backport:
14-
name: Backport
15-
runs-on: ubuntu-22.04
16-
if: >
17-
github.event.pull_request.merged &&
18-
(
19-
github.event.action == 'closed' ||
20-
(
21-
github.event.action == 'labeled' &&
22-
contains(github.event.label.name, 'backport')
23-
)
24-
)
25-
steps:
26-
- name: Backport
27-
uses: zephyrproject-rtos/action-backport@7e74f601d11eaca577742445e87775b5651a965f #tag=v2.0.3-3
28-
with:
29-
issue_labels: Backport
30-
github_token: ${{ secrets.GITHUB_TOKEN }}
17+
uses: dotnet/arcade/.github/workflows/backport-base.yml@aa70f3a7a494063952307a9b1df7ca0ab67bce13
18+
with:
19+
pr_title_template: '[Backport %target_branch%] %source_pr_title% (#%source_pr_number%)'
20+
pr_description_template: |
21+
Backport of #%source_pr_number% to %target_branch%
22+
23+
---
24+
TYPE: NO_HISTORY | FEATURE | BUG | IMPROVEMENT | DEPRECATION | C_API | CPP_API | BREAKING_BEHAVIOR | BREAKING_API | FORMAT
25+
DESC: <short description>
26+
repository_owners: TileDB-Inc

0 commit comments

Comments
 (0)