Skip to content

feat: support configurable branch name for 'main' and other defaults (fixes #523)#687

Open
li5435945-ship-it wants to merge 1 commit into
utterance:masterfrom
li5435945-ship-it:fix/support-main-branch
Open

feat: support configurable branch name for 'main' and other defaults (fixes #523)#687
li5435945-ship-it wants to merge 1 commit into
utterance:masterfrom
li5435945-ship-it:fix/support-main-branch

Conversation

@li5435945-ship-it
Copy link
Copy Markdown

Description

Fixes #523

The branch name was hardcoded as 'master', causing the whitelist feature to fail when repositories use 'main' or other default branch names.

Changes

  • Add 'branch' parameter to page-attributes (defaults to 'master')
  • Make branch variable in github.ts configurable via setRepoContext()
  • Update error message link to use the configured branch

Usage

Users can now specify the branch name in the utterances script tag:

If not specified, defaults to 'master' for backward compatibility.

The branch name was hardcoded as 'master', causing the whitelist
feature to fail when repositories use 'main' or other default
branch names.

Changes:
- Add 'branch' parameter to page-attributes (defaults to 'master')
- Make branch variable in github.ts configurable via setRepoContext()
- Update error message link to use the configured branch

Fixes utterance#523
@li5435945-ship-it li5435945-ship-it force-pushed the fix/support-main-branch branch from 97e2655 to a674be1 Compare June 4, 2026 03:50
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.

"main" branch name circumvents whitelist

1 participant