chore(relesae): fix backport PR after release #1333
<!-- codex-pull-request-review-summary -->
<!-- codex-review-state:v1 {"code_review":{"commit_sha":"230455bc84ccb453a21e78259712f7e82e29602c","has_any_findings":false,"has_unresolved_findings":false,"status":"completed"},"security_review":{"commit_sha":"230455bc84ccb453a21e78259712f7e82e29602c","has_any_findings":null,"has_unresolved_findings":null,"status":"completed"}} -->
<!-- codex-security-review:v1 {"blockingSeverityThreshold":"P0","headSha":"230455bc84ccb453a21e78259712f7e82e29602c","mergeGateEnabled":false,"pullRequestNumber":1333,"repository":"DataDog/dd-sdk-flutter","status":"completed"} -->
<details>
<summary><strong>Codex Review Summary</strong>: ✅ Completed</summary>
This comment shows the latest Codex review activity on this pull request.
| Review | Status | Commit | Review trigger |
| --- | --- | --- | --- |
| 📝 Code Review | ✅ Completed <relative-time datetime="2026-11-30T21:25:06.905211Z">2026-11-30T21:25:06.905211Z</relative-time> | 230455b | New commits |
| 🔒 Security Review | ✅ Completed <relative-time datetime="2026-11-30T21:27:06.470047Z">2026-11-30T21:27:06.470047Z</relative-time> | 230455b | New commits |
<details> <summary>ℹ️ About Codex in GitHub</summary>
<br/>
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.
</details>
</details>
@codex review
<!-- codex-review-receipt:v1 -->
Codex Review: Didn't find any major issues. Chef's kiss.
Reviewed commit: bc9734e5d7
<details> <summary>ℹ️ About Codex in GitHub</summary>
<br/>
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
</details>
<!-- datadog-code-review reviewer-id=bad90057-5c12-4101-ad47-d91c9dff0f90 -->
<!-- datadog-autotest-inline:v1:prod -->
<!-- datadog-autotest-delivery:v1:prod:ff497e710ccc2de82914417759b966164c92269bd7cf20f4affeaaf251ea732d:inline-0 -->
<sub><sub>!P2</sub></sub> Refresh the installation token during long releases
<!-- autotest-finding-meta prod_data_type=none finding_id=5ab80ee5-ab29-4ce2-8d84-b309f0858850 prod_effect=static -->
If a multi-package release pushes its final tag before the installation token expires but remains polling afterward, the next gh run list fails authentication and aborts the release. Installation tokens expire after one hour, while the orchestrator waits sequentially for up to 30 minutes per package within a six-hour job. Previously, these API calls used the job token and could finish after the final tag push. This can leave published packages without GitHub Releases or the content backport. Refresh credentials during orchestration; this requires coordinating workflow and releaser changes rather than a localized replacement.
<!-- datadog-autotest-feedback-legend:v1 -->
React: 👍 useful · 👎 wrong · 😕 unclear · 👀 right, but not acting on it
<details><summary>What each reaction means</summary>
</details>
<sub>🤖 Bits Code Review</sub> <sub>· <a href="https://app.datadoghq.com/code/43d035d1-e7e6-43c4-b310-861f233d4902?referrer=autotest-pr-comment">Open Bits AI session</a></sub>
Long multi-package releases can outlive the newly shared installation token, aborting polling after packages have published and leaving GitHub Releases or the content backport incomplete.
<sub>Open Bits AI session</sub>
<sub>🤖 Bits Code Review · Commit bc9734e</sub>
<!-- autotest-meta model=gpt-6.1-sol engine=codex reasoning_effort=high verdict=FAIL ddrs_bucket=unknown session_id=43d035d1-e7e6-43c4-b310-861f233d4902 -->
<!-- datadog-code-review reviewer-id=bad90057-5c12-4101-ad47-d91c9dff0f90 -->
<!-- datadog-autotest:v1:prod -->
<!-- datadog-autotest-delivery:v1:prod:ff497e710ccc2de82914417759b966164c92269bd7cf20f4affeaaf251ea732d:bundle -->
<!-- codex-review-receipt:v1 -->
🛡️ Codex Security Review · _Automatically triggered_
Security review completed. No security issues were found in this pull request.
Reviewed commit: bc9734e5d7
_Only the user who started this review can view the report in Codex._
<details> <summary>ℹ️ About Codex security reviews in GitHub</summary>
<br/>
This is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found.
</details>
<!-- datadog-code-review reviewer-id=bad90057-5c12-4101-ad47-d91c9dff0f90 -->
<!-- datadog-autotest-inline:v1:prod -->
<!-- datadog-autotest-delivery:v1:prod:adfe6f87c0cde3576b0f6242b66ec921879442b3416d2b55eaa95fb3ff08af0f:inline-0 -->
<sub><sub>!P1</sub></sub> Refresh the installation token during long releases
<!-- autotest-finding-meta prod_data_type=none finding_id=052c0a5b-ed6b-43db-a3b8-e7846018ec25 prod_effect=static -->
If sequential package publishes exceed the installation token's one-hour lifetime, GitHub CLI polling now fails authentication. For example, the final package's tag can be pushed before expiry but its publish can finish afterward, leaving the package published without its GitHub Release or content backport. Previously, these CLI calls used the job-lived GITHUB_TOKEN. The workflow allows six hours, but mints the replacement token only once. Renew credentials during orchestration and update both CLI authentication and the git remote; this requires broader changes than a localized replacement.
<!-- datadog-autotest-feedback-legend:v1 -->
React: 👍 useful · 👎 wrong · 😕 unclear · 👀 right, but not acting on it
<details><summary>What each reaction means</summary>
</details>
<sub>🤖 Bits Code Review</sub> <sub>· <a href="https://app.datadoghq.com/code/758bc9c4-27b0-46db-99a4-725707c828fe?referrer=autotest-pr-comment">Open Bits AI session</a></sub>
The installation token used for GitHub CLI calls is minted only once but can expire within the six-hour workflow window, breaking authentication mid-release and potentially leaving packages published without a corresponding GitHub Release or content backport. Credentials must be renewed during orchestration (and the git remote updated accordingly) to prevent silent partial releases.
<sub>Open Bits AI session</sub>
<sub>🤖 Bits Code Review · Commit 230455b</sub>
<!-- autotest-meta model=gpt-6.1-sol engine=codex reasoning_effort=high verdict=FAIL ddrs_bucket=unknown session_id=758bc9c4-27b0-46db-99a4-725707c828fe -->
<!-- datadog-code-review reviewer-id=bad90057-5c12-4101-ad47-d91c9dff0f90 -->
<!-- datadog-autotest:v1:prod -->
<!-- datadog-autotest-delivery:v1:prod:adfe6f87c0cde3576b0f6242b66ec921879442b3416d2b55eaa95fb3ff08af0f:bundle -->
Approved these changes.
barboraplasovska
fuzzybinary
What and why?
The backport of the "content" commit after a release failed because the workflow didn't have permissions to make a PR. Modify the chainguard to have the proper permissions.
Additionally, isolate out the Slack notification so it fires in a more restricted environment, both so the token can be held more securely and so that it doesn't have access to tokens it doesn't need.
Review checklist