forked from getsentry/sentry-javascript
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request getsentry#6996 from getsentry/master
[Gitflow] MANUALLY merge master into develop
- Loading branch information
Showing
53 changed files
with
1,449 additions
and
162 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: Gitflow - Sync master into develop | ||
on: | ||
push: | ||
branches: | ||
- master | ||
paths: | ||
# When the version is updated on master (but nothing else) | ||
- 'lerna.json' | ||
- '!**/*.js' | ||
- '!**/*.ts' | ||
workflow_dispatch: | ||
|
||
env: | ||
DEV_BRANCH: develop | ||
|
||
jobs: | ||
main: | ||
name: Create PR master->develop | ||
runs-on: ubuntu-20.04 | ||
permissions: | ||
pull-requests: write | ||
contents: write | ||
steps: | ||
- name: git checkout | ||
uses: actions/checkout@v3 | ||
|
||
# https://github.com/marketplace/actions/github-pull-request-action | ||
- name: Create Pull Request | ||
id: open-pr | ||
uses: repo-sync/pull-request@v2 | ||
with: | ||
destination_branch: ${{ env.DEV_BRANCH }} | ||
pr_title: '[Gitflow] Merge ${{ github.ref_name }} into ${{ env.DEV_BRANCH }}' | ||
pr_body: 'Merge ${{ github.ref_name }} branch into ${{ env.DEV_BRANCH }}' | ||
|
||
# https://github.com/marketplace/actions/enable-pull-request-automerge | ||
- name: Enable automerge for PR | ||
if: steps.open-pr.outputs.pr_number != '' | ||
uses: peter-evans/enable-pull-request-automerge@v2 | ||
with: | ||
pull-request-number: ${{ steps.open-pr.outputs.pr_number }} | ||
merge-method: merge | ||
|
||
# https://github.com/marketplace/actions/auto-approve | ||
- name: Auto approve PR | ||
uses: hmarr/auto-approve-action@v3 | ||
with: | ||
pull-request-number: ${{ steps.open-pr.outputs.pr_number }} | ||
review-message: 'Auto approved automated PR' | ||
# TODO: Use the token of some user here?? | ||
# github-token: ${{ secrets.SOME_USERS_PAT }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
name: Gitflow - Sync develop into master | ||
on: | ||
push: | ||
branches: | ||
- develop | ||
paths: | ||
# We want to trigger this when ONLY the changlog is changed on develop, but nothing else | ||
- 'CHANGELOG.md' | ||
- '!packages' | ||
- '!**/*.js' | ||
- '!**/*.json' | ||
- '!**/*.ts' | ||
workflow_dispatch: | ||
|
||
env: | ||
MAIN_BRANCH: master | ||
|
||
jobs: | ||
main: | ||
name: Create PR develop->master | ||
runs-on: ubuntu-20.04 | ||
permissions: | ||
pull-requests: write | ||
contents: write | ||
steps: | ||
- name: git checkout | ||
uses: actions/checkout@v3 | ||
|
||
# https://github.com/marketplace/actions/github-pull-request-action | ||
- name: Create Pull Request | ||
id: open-pr | ||
uses: repo-sync/pull-request@v2 | ||
with: | ||
destination_branch: ${{ env.MAIN_BRANCH }} | ||
pr_title: '[Gitflow] Merge ${{ github.ref_name }} into ${{ env.MAIN_BRANCH }}' | ||
pr_body: 'Merge ${{ github.ref_name }} branch into ${{ env.MAIN_BRANCH }}' | ||
|
||
# https://github.com/marketplace/actions/enable-pull-request-automerge | ||
- name: Enable automerge for PR | ||
if: steps.open-pr.outputs.pr_number != '' | ||
uses: peter-evans/enable-pull-request-automerge@v2 | ||
with: | ||
pull-request-number: ${{ steps.open-pr.outputs.pr_number }} | ||
merge-method: merge | ||
|
||
# https://github.com/marketplace/actions/auto-approve | ||
- name: Auto approve PR | ||
uses: hmarr/auto-approve-action@v3 | ||
with: | ||
pull-request-number: ${{ steps.open-pr.outputs.pr_number }} | ||
review-message: 'Auto approved automated PR' | ||
# TODO: Use the token of some user here?? | ||
# github-token: ${{ secrets.SOME_USERS_PAT }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Gitflow | ||
|
||
We use [Gitflow](https://docs.github.com/en/get-started/quickstart/github-flow) as a branching model. | ||
|
||
## Summary | ||
|
||
* Ongoing work happens on the `develop` branch | ||
* Any PRs (features, ...) are implemented as PRs against `develop` | ||
* When we are ready to release, we merge develop into master, create a release there, then merge master back into develop | ||
* Whatever is currently on `master` can be considered the last released state of the SDK | ||
* Never merge directly into `master` (unless we want e.g. an emergency bugfix release) | ||
|
||
![gitflow-chart](./assets/gitflow-chart.png) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
|
||
# Publishing a Release | ||
|
||
_These steps are only relevant to Sentry employees when preparing and publishing a new SDK release._ | ||
|
||
**If you want to release a new SDK for the first time, be sure to follow the [New SDK Release Checklist](./new-sdk-release-checklist.md)** | ||
|
||
1. Determine what version will be released (we use [semver](https://semver.org)). | ||
2. Update [`CHANGELOG.md`](https://github.com/getsentry/sentry-javascript/edit/master/CHANGELOG.md) to add an entry for the next release number and a list of changes since the last release. (See details below.) | ||
a. Merging the Changelog PR will automatically trigger a sync from `develop` -> `master` | ||
3. Run the [Prepare Release](https://github.com/getsentry/sentry-javascript/actions/workflows/release.yml) workflow. | ||
a. Wait for this until the sync to `master` is completed. | ||
4. A new issue should appear in https://github.com/getsentry/publish/issues. | ||
5. Ask a member of the [@getsentry/releases team](https://github.com/orgs/getsentry/teams/releases/members) to approve the release. | ||
a. Once the release is completed, a sync from `master` ->` develop` will be automatically triggered | ||
|
||
## Updating the Changelog | ||
|
||
1. Create a new branch. | ||
2. Run `git log --format="- %s"` and copy everything since the last release. | ||
3. Create a new section in the changelog, deciding based on the changes whether it should be a minor bump or a patch release. | ||
4. Paste in the logs you copied earlier. | ||
5. Delete any which aren't user-facing changes. | ||
6. Alphabetize the rest. | ||
7. If any of the PRs are from external contributors, include underneath the commits `Work in this release contributed by <list of external contributors' GitHub usernames>. Thank you for your contributions!`. If there's only one external PR, don't forget to remove the final `s`. If there are three or more, use an Oxford comma. (It's in the Sentry styleguide!) | ||
8. Commit, push, and open a PR with the title `meta: Update changelog for <fill in relevant version here>` against `develop` branch. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.