-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bc6fd32
commit 94b1e16
Showing
13 changed files
with
180 additions
and
11 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
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 @@ | ||
* @marandaneto |
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,41 @@ | ||
name: 🐞 Bug Report | ||
description: Tell us about something that's not working the way we (probably) intend. | ||
labels: ["Platform: iOS", "bug"] | ||
body: | ||
|
||
|
||
- type: input | ||
id: version | ||
attributes: | ||
label: Version | ||
description: SDK Version | ||
placeholder: 3.0.0 ← should look like this | ||
validations: | ||
required: true | ||
|
||
- type: textarea | ||
id: repro | ||
attributes: | ||
label: Steps to Reproduce | ||
description: How can we see what you're seeing? Specific is terrific. | ||
placeholder: |- | ||
1. foo | ||
2. bar | ||
3. baz | ||
validations: | ||
required: true | ||
|
||
- type: textarea | ||
id: expected | ||
attributes: | ||
label: Expected Result | ||
validations: | ||
required: true | ||
|
||
- type: textarea | ||
id: actual | ||
attributes: | ||
label: Actual Result | ||
description: Logs? Screenshots? Yes, please. | ||
validations: | ||
required: true |
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,5 @@ | ||
blank_issues_enabled: false | ||
contact_links: | ||
- name: Ask in the forums | ||
url: https://posthog.com/questions | ||
about: A place to ask questions. |
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,23 @@ | ||
name: 💡 Feature Request | ||
description: Tell us about a problem our SDK could solve but doesn't. | ||
labels: ["enhancement"] | ||
body: | ||
- type: textarea | ||
id: problem | ||
attributes: | ||
label: Problem Statement | ||
description: What problem could we solve that it doesn't? | ||
placeholder: |- | ||
I want to make whirled peas, but it doesn't blend. | ||
validations: | ||
required: true | ||
|
||
- type: textarea | ||
id: expected | ||
attributes: | ||
label: Solution Brainstorm | ||
description: We know you have bright ideas to share ... share away, friend. | ||
placeholder: |- | ||
Add a blender to it. | ||
validations: | ||
required: false |
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,10 @@ | ||
name: Blank Issue | ||
description: Blank Issue. Reserved for maintainers. | ||
body: | ||
- type: textarea | ||
id: description | ||
attributes: | ||
label: Description | ||
description: Please describe the issue. | ||
validations: | ||
required: true |
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 |
---|---|---|
@@ -1,16 +1,15 @@ | ||
**What does this PR do?** | ||
## :bulb: Motivation and Context | ||
<!--- Why is this change required? What problem does it solve? --> | ||
<!--- If it fixes an open issue, please link to the issue here. --> | ||
|
||
**Where should the reviewer start?** | ||
|
||
**How should this be manually tested?** | ||
## :green_heart: How did you test it? | ||
|
||
**Any background context you want to provide?** | ||
|
||
**What are the relevant tickets?** | ||
## :pencil: Checklist | ||
<!--- Put an `x` in the boxes that apply --> | ||
|
||
**Screenshots or screencasts (if UI/UX change)** | ||
|
||
**Questions:** | ||
- Does the docs need an update? | ||
- Are there any security concerns? | ||
- Do we need to update engineering / success? | ||
- [ ] I reviewed the submitted code. | ||
- [ ] I added tests to verify the changes. | ||
- [ ] I updated the docs if needed. | ||
- [ ] No breaking change or entry added to the changelog. |
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,6 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: weekly |
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 |
---|---|---|
|
@@ -6,6 +6,8 @@ on: | |
- main | ||
- v3.0.0 | ||
pull_request: | ||
paths-ignore: | ||
- "**/*.md" | ||
jobs: | ||
build: | ||
runs-on: macos-13 | ||
|
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 |
---|---|---|
|
@@ -6,6 +6,8 @@ on: | |
- main | ||
- v3.0.0 | ||
pull_request: | ||
paths-ignore: | ||
- "**/*.md" | ||
jobs: | ||
build: | ||
runs-on: macos-13 | ||
|
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,16 @@ | ||
name: "Danger" | ||
on: | ||
pull_request: | ||
types: [opened, synchronize, reopened, edited, ready_for_review] | ||
|
||
jobs: | ||
build: | ||
name: Changelog | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- run: npx danger ci | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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 |
---|---|---|
|
@@ -6,6 +6,8 @@ on: | |
- main | ||
- v3.0.0 | ||
pull_request: | ||
paths-ignore: | ||
- "**/*.md" | ||
jobs: | ||
lint: | ||
runs-on: macos-latest | ||
|
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 |
---|---|---|
|
@@ -6,6 +6,8 @@ on: | |
- main | ||
- v3.0.0 | ||
pull_request: | ||
paths-ignore: | ||
- "**/*.md" | ||
jobs: | ||
test: | ||
runs-on: macos-13 | ||
|
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,60 @@ | ||
async function checkChangelog() { | ||
const changelogFile = "CHANGELOG.md"; | ||
|
||
// Check if skipped | ||
const skipChangelog = | ||
danger.github && (danger.github.pr.body + "").includes("#skip-changelog"); | ||
|
||
if (skipChangelog) { | ||
return; | ||
} | ||
|
||
// Check if current PR has an entry in changelog | ||
const changelogContents = await danger.github.utils.fileContents( | ||
changelogFile | ||
); | ||
|
||
const hasChangelogEntry = RegExp(`#${danger.github.pr.number}\\b`).test( | ||
changelogContents | ||
); | ||
|
||
if (hasChangelogEntry) { | ||
return; | ||
} | ||
|
||
// Report missing changelog entry | ||
fail( | ||
"Please consider adding a changelog entry for the next release.", | ||
changelogFile | ||
); | ||
|
||
const prTitleFormatted = danger.github.pr.title | ||
.split(": ") | ||
.slice(-1)[0] | ||
.trim() | ||
.replace(/\.+$/, ""); | ||
|
||
markdown( | ||
` | ||
### Instructions and example for changelog | ||
Please add an entry to \`CHANGELOG.md\` to the "Next" section. Make sure the entry includes this PR's number. | ||
Example: | ||
\`\`\`markdown | ||
## Next | ||
- ${prTitleFormatted} ([#${danger.github.pr.number}](${danger.github.pr.html_url})) | ||
\`\`\` | ||
If none of the above apply, you can opt out of this check by adding \`#skip-changelog\` to the PR description.`.trim() | ||
); | ||
} | ||
|
||
async function checkAll() { | ||
const isDraft = danger.github.pr.mergeable_state === "draft"; | ||
|
||
if (isDraft) { | ||
return; | ||
} | ||
|
||
await checkChangelog(); | ||
} | ||
|
||
schedule(checkAll); |