Skip to content
Merged
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
4 changes: 4 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# https://docs.github.com/articles/about-code-owners
# Require review from the SDK team on every PR.

* @Iterable/sdk-team
23 changes: 19 additions & 4 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,22 @@
## 🔹 Jira Ticket(s) if any
# 📝 Summary
> _This should be a 150 characters summary of the changes on this PR_

* [SDK-XXXX](https://iterable.atlassian.net/browse/SDK-XXXX)
###### 🎟️ Jira Ticket: [SDK-XXXX](https://iterable.atlassian.net/browse/SDK-XXXX)

## ✏️ Description
## 📖 Description
> Please provide a description of what this pull request does.

> Please provide a brief description of what this pull request does.
## 🧪 How to test?
> How to test the changes added?

## 🧾 Changelog
> Add an entry to `CHANGELOG.md`. If this PR has no customer facing changes, write "No customer facing changes" here to skip the changelog check.

## 📹 Loom recording if applicable
> If it helps the reviewer, add a short Loom going over the changes or showcasing the change in behavior.

#### 🐞 Github Issues solved
> If this solves any open GH Issues, please link them here.

#### 📚 Docs PR if applicable
> Open a PR on the [Docs Repo](https://github.com/Iterable/iterable-docs) documenting the changes.
42 changes: 42 additions & 0 deletions .github/workflows/changelog-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Changelog Check
on:
pull_request:
types: [opened, edited, synchronize, reopened]

permissions:
contents: read
pull-requests: read

jobs:
changelog:
name: Verify CHANGELOG update
runs-on: ubuntu-latest
steps:
- name: Check CHANGELOG.md update or opt-out
uses: actions/github-script@v7
with:
script: |
const optOut = 'No customer facing changes';
const body = context.payload.pull_request.body || '';

if (body.toLowerCase().includes(optOut.toLowerCase())) {
core.info(`PR description contains "${optOut}", skipping CHANGELOG.md check.`);
return;
}

const files = await github.paginate(github.rest.pulls.listFiles, {
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: context.payload.pull_request.number,
per_page: 100,
});

const changed = files.some((f) => f.filename === 'CHANGELOG.md');
if (changed) {
core.info('CHANGELOG.md was updated.');
return;
}

core.setFailed(
'CHANGELOG.md was not updated. Add a CHANGELOG.md entry, or if this PR has no customer facing changes, add "No customer facing changes" to the PR description to justify skipping the changelog.'
);
Loading