{{ message }}
Repository navigation
Use GITHUB_REPOSITORY as the default repo when no repo option is configured in changelog-github - #1871
Merged
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1871 +/- ##
==========================================
+ Coverage 85.49% 86.04% +0.55%
==========================================
Files 70 70
Lines 2550 2558 +8
Branches 687 693 +6
==========================================
+ Hits 2180 2201 +21
+ Misses 339 330 -9
+ Partials 31 27 -4 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Andarist
reviewed
Mar 4, 2026
Comment on lines
+244
to
+253
| process.env.GITHUB_REPOSITORY = data.repo; | ||
| const [changeset, bump] = getChangeset("fixes #1234 and #5678", data.commit); | ||
| expect(await getReleaseLine(changeset, bump, null)).toMatchInlineSnapshot(` | ||
| " | ||
|
|
||
| - [#1613](https://github.com/emotion-js/emotion/pull/1613) [\`a085003\`](https://github.com/emotion-js/emotion/commit/a085003) Thanks [@Andarist](https://github.com/Andarist)! - something | ||
| fixes [#1234](https://github.com/emotion-js/emotion/issues/1234) and [#5678](https://github.com/emotion-js/emotion/issues/5678)" | ||
| `); | ||
|
|
||
| process.env.GITHUB_REPOSITORY = undefined; |
Member
There was a problem hiding this comment.
Please wrap this in try/catch so the env variable gets reverted correctly. Ideally, we should do this using a helper like this:
function setEnvironmentVariable(name: string, value: string | undefined) {
const hadValue = Object.hasOwn(process.env, name);
const originalValue = process.env[name];
if (typeof value === "string") {
process.env[name] = value;
} else {
delete process.env[name];
}
return () => {
if (hadValue) {
process.env[name] = originalValue;
} else {
delete process.env[name];
}
};
}Feel free to add it to the test-utils
Contributor
Author
There was a problem hiding this comment.
Should be done if I understood you correctly.
Andarist
reviewed
Mar 4, 2026
Member
There was a problem hiding this comment.
Let's not couple options.repo with env. Please introduce a new util called smth like resolveRepository
Andarist
approved these changes
Jun 26, 2026
GITHUB_REPOSITORY as the default repo when no repo option is configured in changelog-github
Andarist
enabled auto-merge
June 26, 2026 07:06
1 task done
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Fixes #1870.
Makes the changelog generator options object fully optional, as the env variable is defined in GitHub Actions.
Less configuring, simpler to use.