Skip to content
Closed
Show file tree
Hide file tree
Changes from 3 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
1 change: 1 addition & 0 deletions .github/workflows/indexer-build-and-push-testnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: Indexer Build & Push Images to AWS ECR for Testnet Branch
on: # yamllint disable-line rule:truthy
pull_request:
branches:
- 'jv/expose-geo-headers'
- main
- 'release/indexer/v[0-9]+.[0-9]+.x' # e.g. release/indexer/v0.1.x
- 'release/indexer/v[0-9]+.x' # e.g. release/indexer/v1.x
Comment on lines 4 to 8
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.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🌐 Web query:

GitHub Actions pull_request trigger branches filter behavior default

💡 Result:

Short answer

  • For pull_request, branch filters (branches / branches-ignore) apply to the pull request’s target (base) branch, not the head/compare branch. [1]
  • If you do not specify branches/branches-ignore, the default is “match all branches” (effectively '**'). [2]

Sources

  1. GitHub Actions events docs — "Running your pull_request workflow based on the head or base branch..." (explains filters apply to PR target/base). [1]
  2. Workflow syntax docs — branch pattern semantics and that '**' (all branches) is the default when no branches filter is used. [2]

Clarify why pull_request.branches includes a developer feature branch.

The branches filter in pull_request events applies to the PR's target (base) branch, not the source branch. This means the workflow only runs for PRs targeting the listed branches as their base. Including jv/expose-geo-headers as a target branch is unusual—most feature work targets main or a release branch. Either this branch is intentionally maintained as a base for collaborative PRs (in which case document it), or it should be removed before merging this change. If the intent is to run this workflow on all PRs regardless of target branch, remove the branches filter entirely.

🤖 Prompt for AI Agents
.github/workflows/indexer-build-and-push-testnet.yml around lines 4 to 9: the
pull_request.branches list includes a developer feature branch
(jv/expose-geo-headers) which is confusing because pull_request.branches filters
the PR base (target) branches; either remove that feature branch from the list
if it was added accidentally, or explicitly document in the workflow or repo
CONTRIBUTING that this branch is an intended long-lived base for collaborative
PRs; alternatively, if you want the workflow to run for PRs targeting any
branch, remove the entire branches filter so the workflow triggers on all
pull_request targets.

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/protocol-build-and-push-snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: Protocol Build & Push Image to AWS ECR
on: # yamllint disable-line rule:truthy
push:
branches:
- 'jv/expose-geo-headers'
- main
- 'release/protocol/v[0-9]+.[0-9]+.x' # e.g. release/protocol/v0.1.x
- 'release/protocol/v[0-9]+.x' # e.g. release/protocol/v1.x
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,19 @@ export default function geoHeadersMiddleware(
): void {
const country = req.headers['geo-origin-country'];
if (country !== undefined) {
res.header('Access-Control-Expose-Headers', 'geo-origin-country');
res.set('Geo-Origin-Country', country);
}

const region = req.headers['geo-origin-region'];
if (region !== undefined) {
res.header('Access-Control-Expose-Headers', 'geo-origin-region');
res.set('Geo-Origin-Region', region);
}

const status = req.headers['geo-origin-status'];
if (status !== undefined) {
res.header('Access-Control-Expose-Headers', 'geo-origin-status');
res.set('Geo-Origin-Status', status);
}

Expand Down
Loading