Skip to content

ci: add backport action#655

Open
nicpuppa wants to merge 2 commits intomainfrom
nicpuppa/add-backport-workflow
Open

ci: add backport action#655
nicpuppa wants to merge 2 commits intomainfrom
nicpuppa/add-backport-workflow

Conversation

@nicpuppa
Copy link

@nicpuppa nicpuppa commented Feb 12, 2026

Description of the change

Add backport action to the project https://github.com/korthout/backport-action

Type of change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update

Checklist

  • I have read the CONTRIBUTING doc
  • I have opened this pull request against the alpha branch
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

Further comments

[If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc...]

uses: korthout/backport-action@v4
with:
# Token to authenticate requests to GitHub
github_token: ${{ secrets.BACKPORT_ACTION_PAT }}
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jwulf I don't have full access to this project, do we have a PAT token ? If not can you create one ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Workflows that run on main get a GitHub token automatically, see here for an example of using it:

https://github.com/camunda/camunda-8-js-sdk/blob/main/.github/workflows/release.yml#L303

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, it looks like if you use that token then no workflows will run on the PR:

https://docs.github.com/en/actions/concepts/security/github_token#when-github_token-triggers-workflow-runs

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would we not be better off to create a GitHub App for backport token exchange, and use actions/create-github-app-token?

- name: Generate token
  id: generate-token
  uses: actions/create-github-app-token@v1
  with:
    app-id: ${{ vars.APP_ID }}
    private-key: ${{ secrets.APP_PRIVATE_KEY }}

- name: Create backport PR
...
   uses: korthout/backport-action@v4
        with:
          # Token to authenticate requests to GitHub
          github_token: ${{ steps.generate-token.outputs.token }}

We could use this pattern on all the SDKs, and the token is short-lived (one hour).

Copy link
Member

@jwulf jwulf Feb 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another option would be to use a workflow_dispatch trigger if the backport action creates a PR.


Actually, the comment below does not apply to this repository. This repo does not have any generated code in it. But we'll need to figure out a different strategy for the new TypeScript, Python, and C# repos. Maybe changing the way that generated code is committed (maybe excluding it from dev machines and only committing it in a separate commit in CI).

For those repos, at the moment, PRs will include a large amount of generated code. A fix applied to main will be building from the current development specification, with all the generated methods.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the backport action is used in the majority of the repository in camunda, we should use it also here. We just need a PAT token, not sure if you can do it or we need to ask IT

Since now we will have stable branches as well, I think it's a useful tool to have also here and in all the other sdk repository

cc @megglos

@nicpuppa nicpuppa marked this pull request as ready for review February 13, 2026 12:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments