Skip to content

Publish the linter badges to a badges branch, not onto the pull request - #87

Merged
oblomov-dev merged 1 commit into
mainfrom
claude/peaceful-pascal-4z2w4v
Sep 27, 2026
Merged

oblomov-dev merged 1 commit into
mainfrom
claude/peaceful-pascal-4z2w4v

Conversation

@oblomov-dev

Copy link
Copy Markdown
Member

Why

check-abap2UI5 committed the two badge JSONs onto the pull request branch, because main is protected and github-actions[bot] cannot bypass that. That bot commit started a second set of workflow runs that wait for a maintainer's approval (action_required), so every pull request that moved a badge was left blocked (#86).

Change

  • Publish step: runs only on main and only after a green gate. It pushes the two files as a fast-forward to an orphan badges branch that holds nothing else. A failed push is a warning.
  • Pull request runs: they publish nothing. They check out the default merge ref again; the head branch was only needed to push back.
  • README: reads the badges from …/samples-stack/badges/<file>.json.
  • .github/badges/: no longer tracked, since every run rewrites it, and added to .gitignore.
  • bump-linter: the weekly run no longer restores the badge files.
  • Docs: the workflow comment, abap2ui5lint.jsonc and AGENTS.md (.github/ paragraph) describe the new path.

After merging

  • The first check-abap2UI5 run on main creates the badges branch. Until it has run, the two README badges show "resource not found".
  • If a ruleset protects every branch, that run shows a warning, and the rule needs an exception for badges.

Checks

  • Publish script: tested against a local bare remote. It creates the orphan branch, skips an unchanged badge, fast-forwards on a change, and leaves main untouched.
  • Workflows: both parse as YAML.
  • Gates: check:prose, check:samples-md, check:catalogue and check:app-rules pass.

🤖 Generated with Claude Code

https://claude.ai/code/session_014bLQZPXbB8xmewCNmnBJaG


Generated by Claude Code

The check-abap2UI5 workflow committed the two badge JSONs onto the pull request
branch, because main is protected and github-actions[bot] cannot bypass
that. That bot commit started a second set of workflow runs which wait
for a maintainer's approval (action_required), so every pull request
that moved a badge was left blocked.

The badges now live on an orphan `badges` branch that holds nothing else:
- the publish step runs only on main, after a green gate, and pushes the
  two files there as a fast-forward; a failed push is a warning
- pull request runs publish nothing and check out the default merge ref
  again - the head branch was only needed to push back
- the README reads the badges from the badges branch
- .github/badges/ is no longer tracked (every run rewrites it) and is
  ignored
- the weekly bump-linter run no longer restores the badge files - there is
  nothing tracked to restore

The branch is created by the first run on main after this merges; until
then the two README badges show "resource not found".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014bLQZPXbB8xmewCNmnBJaG
@oblomov-dev
oblomov-dev merged commit c3ef275 into main Sep 27, 2026
23 checks passed
@oblomov-dev
oblomov-dev deleted the claude/peaceful-pascal-4z2w4v branch September 27, 2026 20:16
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