Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ A temporary add-on is removed when Firefox restarts, so repeat step 2 after a re
## How it works

- Rows are found by GitHub's stack badge (`aria-label="Pull request stack, position X of Y"`). The badge doesn't say *which* stack a PR is in, and position/size alone can't tell apart two stacks of the same size.
- For each stack, the extension makes one same-origin request with your GitHub session. It first tries `/{owner}/{repo}/pull/{n}/page_data/stack` (the endpoint GitHub's badge popup uses), then falls back to the stack JSON embedded in the PR page. The response lists every PR in the stack with its title and state.
- For each stack, the extension makes one same-origin request with your GitHub session. It first tries `/{owner}/{repo}/pull/{n}/page_data/stacks` (the endpoint GitHub's badge popup uses), then falls back to the stack JSON embedded in the PR page. The response lists every PR in the stack with its title and state.
- Rows are regrouped with CSS `order` on the existing list items instead of moving GitHub's DOM nodes, so GitHub's React code keeps working. Keyboard navigation still follows GitHub's original order.
- Fold state per stack is kept in `storage.local`; the default lives in `storage.sync`. The APIs are reached
through `browser` when it exists and `chrome` otherwise, because Firefox's `chrome` alias is the
Expand Down
2 changes: 1 addition & 1 deletion src/content.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
const base = `/${pull.owner}/${pull.repo}/pull/${pull.number}`;
// Same endpoint GitHub's own stack badge dialog uses (requires a signed-in session).
try {
const response = await fetch(`${base}/page_data/stack`, {
const response = await fetch(`${base}/page_data/stacks`, {
credentials: "same-origin",
headers: {
Accept: "application/json",
Expand Down