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

chore(tools): Use PR number in changeset titles when Issue is absent #3152

Merged
merged 3 commits into from
May 26, 2023

Conversation

abernix
Copy link
Member

@abernix abernix commented May 26, 2023

Previously, it was just leaving it off, but it left things a bit
unharmonic/off-balance in terms of the resulting changeset template. I'd
also just been manually adding those during the release process thus far, so
figured I'd just automate it now.

Also added a lot of tests and fixed a couple bugs with trailing spaces.

Relates to ##2261

…g changeset with no Issue

Previously, it was just leaving it off, but it left things a bit
unharmonic/off-balance in terms of the resulting changeset template.  I'd
also just been manually adding those during the release process thus far, so
figured I'd just automate it now.

Also, added insta tests that make sure things are rendering properly.
@github-actions
Copy link
Contributor

@abernix, please consider creating a changeset entry in /.changesets/. These instructions describe the process and tooling.

@router-perf
Copy link

router-perf bot commented May 26, 2023

CI performance tests

  • const - Basic stress test that runs with a constant number of users
  • no-graphos - Basic stress test, no GraphOS.
  • step - Basic stress test that steps up the number of users over time
  • reload - Reload test over a long period of time at a constant rate of users
  • xlarge-request - Stress test with 10Mb request payload
  • large-request - Stress test with a 1Mb request payload
  • xxlarge-request - Stress test with 100Mb request payload

xtask/Cargo.toml Show resolved Hide resolved
Comment on lines +70 to +85
{{- if issues -}}
{{- if issues }} {{ endif -}}
{{- for issue in issues -}}
([Issue #{issue.number}]({issue.url}))
{{- if not @last }}, {{ endif -}}
{{- endfor -}}
{{ else -}}
{{- if pulls -}}
{{- if pulls }} {{ endif -}}
{{- for pull in pulls -}}
([PR #{pull.number}]({pull.url}))
{{- if not @last }}, {{ endif -}}
{{- endfor -}}
{{- else -}}
{{- endif -}}
{{- endif }}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Having this more nicely formatted is... nice. :) There are some bug-fixes in there, too, and then the actual feature that this PR claims to add.

Comment on lines +89 to +91
By [@{author}](https://github.com/{author}){{ if pulls }} in {{ for pull in pulls -}}
{pull.url}{{ if not @last }}, {{ endif }}
{{- endfor }}
{{- endfor }}{{ endif }}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: There is no condition in the code today that actually results in there being multiple pulls members, but this template still supports it. A future state can support it easily.

xtask/src/commands/changeset/mod.rs Outdated Show resolved Hide resolved
xtask/Cargo.toml Show resolved Hide resolved
{{- endfor }}
const EXAMPLE_TEMPLATE: &'static str = "### { title }
{{- if issues -}}
{{- if issues }} {{ endif -}}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
{{- if issues }} {{ endif -}}

shouldn't this be removed?

Copy link
Member Author

@abernix abernix May 26, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good eye and question, but no and hard to comment in the code (since it's within a template) why it exists. It actually allows me to:

  • use a nice formatted structure for this template
  • while ensuring that there will be a space preserved there at all times
  • while not leaving a trailing whitespace on the ### title line which would almost certainly get removed by someone's editor.

@abernix abernix enabled auto-merge (squash) May 26, 2023 10:05
@abernix abernix merged commit 239c745 into dev May 26, 2023
@abernix abernix deleted the abernix/changeset-changes branch May 26, 2023 11:04
@abernix abernix mentioned this pull request May 26, 2023
abernix added a commit that referenced this pull request May 26, 2023
This is the result of running `cargo update` in the `xtask/` directory (our
directory of tooling; not runtime components) to bring things more up to
date.

Follows-up: #3149

Some of the changes in #3152
seem to have undone some of the dependency updates, so this re-applies them.
abernix added a commit that referenced this pull request May 30, 2023
This is the result of running `cargo update` in the `xtask/` directory
(our
directory of tooling; not runtime components) to bring things more up to
date.

Follows-up: #3149

Some of the changes in #3152
seem to have undone some of the dependency updates, so this re-applies
them.
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