Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update changesets' auto-commit feature to not suppress CI on commits #1100

Merged
merged 2 commits into from
Dec 20, 2024

Conversation

jeremywiebe
Copy link
Contributor

@jeremywiebe jeremywiebe commented Dec 20, 2024

Summary:

I recently updated our Changesets config to auto-commit the .md file when using yarn changset to describe a set of changes. This broke our releases as the default behaviour is that Changesets adds [skip ci] to the commit created when running yarn changesets version. No CI on that PR/commit, meant that none of our release Github Actions ran!

So this PR fixes the config so that Changesets no longer adds [skip ci] to any commits, but still auto-commits them.

Similar PRs

Issue: "none"

Test plan:

Land this PR
Merge main into an open Version Packages PR
Land that PR and ensure the release goes out

@jeremywiebe jeremywiebe self-assigned this Dec 20, 2024
Copy link

changeset-bot bot commented Dec 20, 2024

🦋 Changeset detected

Latest commit: af68af2

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 0 packages

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@khan-actions-bot
Copy link
Contributor

khan-actions-bot commented Dec 20, 2024

Gerald

Required Reviewers
  • @Khan/frontend-infra for changes to .changeset/config.json, .changeset/short-buttons-juggle.md

Don't want to be involved in this pull request? Comment #removeme and we won't notify you of further changes.

@khan-actions-bot khan-actions-bot requested a review from a team December 20, 2024 18:27
Copy link

codecov bot commented Dec 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.85%. Comparing base (506ed87) to head (af68af2).
Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #1100   +/-   ##
=======================================
  Coverage   99.85%   99.85%           
=======================================
  Files          97       97           
  Lines        1392     1392           
  Branches      351      359    +8     
=======================================
  Hits         1390     1390           
  Misses          1        1           
  Partials        1        1           

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 506ed87...af68af2. Read the comment docs.

@jandrade
Copy link
Member

@jeremywiebe hmm any idea why the checks failed here? @somewhatabstract surely has thoughts on this.

jeremywiebe added a commit to Khan/perseus that referenced this pull request Dec 20, 2024
…2052)

## Summary:

I recently updated our Changesets config to auto-commit the `.md` file when using `yarn changset` to describe a set of changes. This broke our releases as the default behaviour is that Changesets adds `[skip ci]` to the commit created when running `yarn changesets version`. No CI on that PR/commit, meant that none of our release Github Actions ran!

So this PR fixes the config so that Changesets no longer adds `[skip ci]` to any commits, but still auto-commits them. 

### Similar PRs

  * Wonder-Blocks: Khan/wonder-blocks#2409
  * Wonder-Stuff: Khan/wonder-stuff#1100
  * Perseus: #2052 (this PR!)

Issue: "none"

## Test plan:

Land this PR
Merge `main` into an open Version Packages PR
Land that PR and ensure the release goes out

Author: jeremywiebe

Reviewers: catandthemachines, jandrade, somewhatabstract

Required Reviewers:

Approved By: catandthemachines, jandrade

Checks: ✅ Publish npm snapshot (ubuntu-latest, 20.x), ✅ Check for .changeset entries for all changed files (ubuntu-latest, 20.x), ✅ Lint, Typecheck, Format, and Test (ubuntu-latest, 20.x), ✅ Check builds for changes in size (ubuntu-latest, 20.x), ✅ Cypress (ubuntu-latest, 20.x), ⏹️  [cancelled] Publish npm snapshot (ubuntu-latest, 20.x), ⏹️  [cancelled] Lint, Typecheck, Format, and Test (ubuntu-latest, 20.x), ⏹️  [cancelled] Check for .changeset entries for all changed files (ubuntu-latest, 20.x), ⏹️  [cancelled] Cypress (ubuntu-latest, 20.x), ⏹️  [cancelled] Check builds for changes in size (ubuntu-latest, 20.x), ✅ Publish Storybook to Chromatic (ubuntu-latest, 20.x)

Pull Request URL: #2052
@jeremywiebe
Copy link
Contributor Author

@jeremywiebe hmm any idea why the checks failed here? @somewhatabstract surely has thoughts on this.

It's because the check for what needs a changeset is a bit aggressive. It thinks that the change to .changeset/config.json needs a changeset. I'll add an empty one to appease it.

Run actions/github-script@v7
  with:
    script: const inputFiles = JSON.parse(`[".changeset/config.json"]`);
  require('/home/runner/work/_actions/Khan/actions/check-for-changeset-v1/index.js')({context, core, inputFiles})
  
    github-token: ***
    debug: false
    user-agent: actions/github-script
    result-encoding: json
    retries: 0
    retry-exempt-status-codes: 400,401,403,404,422
  env:
    CI: true
Error: This PR does not have a changeset. You can add one by running `yarn changeset` and following the prompts.

Copy link
Contributor

Size Change: 0 B

Total Size: 4.63 kB

ℹ️ View Unchanged
Filename Size
packages/wonder-stuff-core/dist/browser/es/index.js 1.85 kB
packages/wonder-stuff-sentry/dist/browser/es/index.js 1.65 kB
packages/wonder-stuff-testing/dist/browser/es/index.js 1.12 kB

compressed-size-action

@jeremywiebe jeremywiebe merged commit 5a5f294 into main Dec 20, 2024
8 checks passed
@jeremywiebe jeremywiebe deleted the jer/changeset-auto-commit-with-ci branch December 20, 2024 23:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants