diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 000000000..fd89ad1d4 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1 @@ +* @marandaneto diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 000000000..54021d95b --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -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 diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 000000000..64d359ba1 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -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. diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml new file mode 100644 index 000000000..3ae03e2c4 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -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 diff --git a/.github/ISSUE_TEMPLATE/maintainer-blank.yml b/.github/ISSUE_TEMPLATE/maintainer-blank.yml new file mode 100644 index 000000000..e120920ac --- /dev/null +++ b/.github/ISSUE_TEMPLATE/maintainer-blank.yml @@ -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 diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 2a7ecc687..0425157cd 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,16 +1,15 @@ -**What does this PR do?** +## :bulb: Motivation and Context + + -**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 + -**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. diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 000000000..b88a67a7f --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,6 @@ +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: weekly diff --git a/.github/workflows/build-examples.yml b/.github/workflows/build-examples.yml index 26e808f32..ae4f2fca9 100644 --- a/.github/workflows/build-examples.yml +++ b/.github/workflows/build-examples.yml @@ -6,6 +6,8 @@ on: - main - v3.0.0 pull_request: + paths-ignore: + - "**/*.md" jobs: build: runs-on: macos-13 diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c0f423db5..8eda0f876 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -6,6 +6,8 @@ on: - main - v3.0.0 pull_request: + paths-ignore: + - "**/*.md" jobs: build: runs-on: macos-13 diff --git a/.github/workflows/danger.yml b/.github/workflows/danger.yml new file mode 100644 index 000000000..68e3645ba --- /dev/null +++ b/.github/workflows/danger.yml @@ -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 }} diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index a59405907..7ef6a8eea 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -6,6 +6,8 @@ on: - main - v3.0.0 pull_request: + paths-ignore: + - "**/*.md" jobs: lint: runs-on: macos-latest diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ca3012f18..6fe67b538 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -6,6 +6,8 @@ on: - main - v3.0.0 pull_request: + paths-ignore: + - "**/*.md" jobs: test: runs-on: macos-13 diff --git a/dangerfile.js b/dangerfile.js new file mode 100644 index 000000000..91f473ad2 --- /dev/null +++ b/dangerfile.js @@ -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);