Skip to content
Draft
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
3 changes: 3 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
> [!IMPORTANT]
> **Target Branch:** Please make sure the **base branch** dropdown above is set to **`dev`** (not `main`). All development work takes place on the `dev` branch.

Hey there! So you want to contribute to a Firebase SDK?
Before you file this pull request, please read these guidelines:

Expand Down
13 changes: 13 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,19 @@ name: Continuous Integration
on: pull_request
jobs:

check_base_branch:
name: Check base branch
runs-on: ubuntu-latest
steps:
- name: Verify target branch is dev
env:
BASE_REF: ${{ github.base_ref }}
run: |
if [[ "${BASE_REF}" != "dev" ]]; then
echo "::error title=Invalid Base Branch::Pull requests must target the 'dev' branch (currently targeting '${BASE_REF}'). Please edit this PR to change the base branch to 'dev'."
exit 1
fi

module:
name: Module build
runs-on: ubuntu-latest
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,15 +102,15 @@ jobs:
run: ./.github/scripts/publish_preflight_check.sh

# We authorize this step with temporary GitHub App installation token that has
# write access to the master branch.
- name: Fast-forward master to dev
# write access to the main branch.
- name: Fast-forward main to dev
run: |
git checkout dev
git pull origin dev
git checkout master
git pull origin master
git checkout main
git pull origin main
git merge dev --ff-only
git push origin master
git push origin main

# See: https://cli.github.com/manual/gh_release_create
- name: Create release tag
Expand All @@ -122,4 +122,4 @@ jobs:
gh release create "$RELEASE_VER" \
--title "Firebase Admin Go SDK $RELEASE_VER" \
--notes "$RELEASE_BODY" \
--target "master"
--target "main"
4 changes: 3 additions & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,16 @@ The Firebase Admin Go SDK enables server-side (backend) applications to interact
- **DON'T:** Introduce new third-party dependencies without a strong, documented justification and team consensus.

## 9. Branch Creation
- When creating a new barnch use the format `agentName-short-description`.
- Always create new branches from the `dev` branch (never `main`).
- When creating a new branch use the format `agentName-short-description`.
* Example: `jules-auth-token-parsing`
* Example: `gemini-add-storage-file-signer`


## 10. Commit and Pull Request Generation

After implementing and testing a change, you may create a commit and pull request which must follow the following these rules:
- Always target the `dev` branch as the base branch when creating a pull request (e.g., `gh pr create --base dev`). Never target `main`.

### Commit and Pull Request Title Format:
Use the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification: `type(scope): subject`
Expand Down
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,13 @@ Great, we love hearing how we can improve our products! Share you idea through o
## <a name="submit"></a>Want to submit a pull request?

Sweet, we'd love to accept your contribution!
[Open a new pull request](https://github.com/firebase/firebase-admin-go/pull/new/master) and fill
[Open a new pull request](https://github.com/firebase/firebase-admin-go/compare/dev...) and fill

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.

medium

Using the /pull/new/dev endpoint is more consistent with the previous URL structure (/pull/new/master) and provides a cleaner, more direct interface for creating a pull request against the dev branch compared to the /compare/dev... syntax.

Suggested change
[Open a new pull request](https://github.com/firebase/firebase-admin-go/compare/dev...) and fill
[Open a new pull request](https://github.com/firebase/firebase-admin-go/pull/new/dev) and fill

out the provided template.

Make sure to create all your pull requests against the `dev` branch. All development
work takes place on this branch, while the `master` branch is dedicated for released
work takes place on this branch, while the `main` branch is dedicated for released
stable code. This enables us to review and merge routine code changes, without
impacting downstream applications that are building against our `master`
impacting downstream applications that are building against our `main`
branch.

**If you want to implement a new feature, please open an issue with a proposal first so that we can
Expand Down Expand Up @@ -98,7 +98,7 @@ to checkout the sources of Firebase Admin SDK, and its dependencies:

```bash
$ cd $GOPATH
$ git clone https://github.com/firebase/firebase-admin-go.git src/firebase.google.com/go
$ git clone -b dev https://github.com/firebase/firebase-admin-go.git src/firebase.google.com/go
$ go get -d -t firebase.google.com/go/... # Install dependencies
```

Expand Down
Loading