Skip to content

Fix SCM workflow token#19393

Open
Arbaaz123676 wants to merge 4 commits intoopenSUSE:masterfrom
Arbaaz123676:fix-scm-token-disable
Open

Fix SCM workflow token#19393
Arbaaz123676 wants to merge 4 commits intoopenSUSE:masterfrom
Arbaaz123676:fix-scm-token-disable

Conversation

@Arbaaz123676
Copy link
Copy Markdown
Contributor

The circuit breaker logic disabled SCM tokens purely based on message content matching. This could lead to false positives where tokens were disabled even though the workflow delivery succeeded.

This patch ensures that the token is only disabled when the workflow status is fail and the error message indicates an authorization failure (Unauthorized or Forbidden).

Additionally, safe navigation is used when updating the token to avoid errors when the token is nil.

Note: I couldn’t run locally due to Gemfile dependency issues.

Fixes #19183

@github-actions github-actions bot added the Frontend Things related to the OBS RoR app label Mar 5, 2026
@Arbaaz123676 Arbaaz123676 force-pushed the fix-scm-token-disable branch from 67119c4 to 8b0e6c2 Compare March 5, 2026 13:56
# "Failed to report back to GitHub: Request is forbidden."

token.update(enabled: false) if message.include?('Unauthorized request') || /Request (is )?forbidden/.match?(message)
if fail? && (
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We set status: fail 12 lines above, so fail? here will always be true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Frontend Things related to the OBS RoR app

Projects

None yet

Development

Successfully merging this pull request may close these issues.

scm-workflow integrations get disabled even when there is no error

2 participants