Fix changesets action (#4998)

* fix action

* tweak issue template
This commit is contained in:
pngwn 2023-07-22 12:50:57 +01:00 committed by GitHub
parent dc07a9f947
commit ad62cd9238
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 15 deletions

View File

@ -17,18 +17,21 @@ const { packages, rootDir } = getPackagesSync(process.cwd());
/**
*
* @param {string} package_name
* @returns {[string, string|null]}
* @returns {string[]}
*/
function find_packages_dirs(package_name) {
/**
* @type {Package | undefined}
*/
/** @type {string[]} */
let package_dirs = [];
/** @type {Package | undefined} */
const _package = packages.find((p) => p.packageJson.name === package_name);
if (!_package) throw new Error(`Package ${package_name} not found`);
return [
_package.dir,
_package.packageJson.python ? join(_package.dir, "..") : null
];
package_dirs.push(_package.dir);
if (_package.packageJson.python) {
package_dirs.push(join(_package.dir, ".."));
}
return package_dirs;
}
const changelogFunctions = {
@ -168,7 +171,7 @@ const changelogFunctions = {
const suffix = users === null ? "" : ` Thanks ${users}!`;
/**
* @typedef {{[key: string]: string[] | {dirs: [string, string|null], current_changelog: string, feat: {summary: string}[], fix: {summary: string}[], highlight: {summary: string}[]}}} ChangesetMeta
* @typedef {{[key: string]: string[] | {dirs: string[], current_changelog: string, feat: {summary: string}[], fix: {summary: string}[], highlight: {summary: string}[]}}} ChangesetMeta
*/
/**

View File

@ -10,13 +10,9 @@ Before your create a PR, please check to see if there is [an existing issue](htt
Not adhering to this guideline will result in the PR being closed.
## Tests & Changelog
## Tests
1. PRs will only be merged if tests pass on CI. To run the tests locally, please set up [your Gradio environment locally](https://github.com/gradio-app/gradio/blob/main/CONTRIBUTING.md) and run the tests: `bash scripts/run_all_tests.sh`
1. You may need to run the linters: `bash scripts/format_backend.sh` and `bash scripts/format_frontend.sh`
2. You may need to run the linters: `bash scripts/format_backend.sh` and `bash scripts/format_frontend.sh`
1. Unless the pull request is labeled with the "no-changelog-update" label by a maintainer of the repo, all pull requests must update the changelog located in `CHANGELOG.md`:
Please add a brief summary of the change to the Upcoming Release section of the `CHANGELOG.md` file and include
a link to the PR (formatted in markdown) and a link to your github profile (if you like). For example, "* Added a cool new feature by `[@myusername](link-to-your-github-profile)` in `[PR 11111](https://github.com/gradio-app/gradio/pull/11111)`".