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

tools: improve release proposal PR opening #56128

Closed
wants to merge 1 commit into from

Conversation

targos
Copy link
Member

@targos targos commented Dec 4, 2024

  • Open as draft. The releaser should review the PR and mark it as ready.
  • Add the "release" label.
  • Assign the releaser to the PR so it's clearer who's in charge and
    they can find it more easily. This will also notify and subscribe
    them to the PR.

- Open as draft. The releaser should review the PR and mark it as ready.
- Add the "release" label.
- Assign the releaser to the PR so it's clearer who's in charge and
  they can find it more easily. This will also notify and subscribe
  them to the PR.
@targos targos requested a review from a team as a code owner December 4, 2024 10:55
@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/actions
  • @nodejs/releasers

@nodejs-github-bot nodejs-github-bot added meta Issues and PRs related to the general management of the project. tools Issues and PRs related to the tools directory. labels Dec 4, 2024
Copy link
Contributor

@aduh95 aduh95 left a comment

Choose a reason for hiding this comment

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

N.B.: this will conflict with #56054, which should land first

LGTM otherwise

@targos targos closed this Dec 6, 2024
@targos
Copy link
Member Author

targos commented Dec 6, 2024

Unfortunately I don't have the time to learn the GitHub API. A quick glance at https://docs.github.com/en/rest/pulls/pulls?apiVersion=2022-11-28#create-a-pull-request seems to suggest you cannot add assignee while creating a PR.

@ruyadorno
Copy link
Member

ruyadorno commented Dec 6, 2024

Unfortunately I don't have the time to learn the GitHub API. A quick glance at https://docs.github.com/en/rest/pulls/pulls?apiVersion=2022-11-28#create-a-pull-request seems to suggest you cannot add assignee while creating a PR.

It looks like it's there! I think the way it is in this PR should work!

$ gh help pr create
Create a pull request on GitHub.

When the current branch isn't fully pushed to a git remote, a prompt will ask where
to push the branch and offer an option to fork the base repository. Use `--head` to
explicitly skip any forking or pushing behavior.

A prompt will also ask for the title and the body of the pull request. Use `--title` and
`--body` to skip this, or use `--fill` to autofill these values from git commits.
It's important to notice that if the `--title` and/or `--body` are also provided
alongside `--fill`, the values specified by `--title` and/or `--body` will
take precedence and overwrite any autofilled content.

Link an issue to the pull request by referencing the issue in the body of the pull
request. If the body text mentions `Fixes #123` or `Closes #123`, the referenced issue
will automatically get closed when the pull request gets merged.

By default, users with write access to the base repository can push new commits to the
head branch of the pull request. Disable this with `--no-maintainer-edit`.

Adding a pull request to projects requires authorization with the `project` scope.
To authorize, run `gh auth refresh -s project`.


USAGE
  gh pr create [flags]

ALIASES
  gh pr new

FLAGS
  -a, --assignee login       Assign people by their login. Use "@me" to self-assign.
  -B, --base branch          The branch into which you want your code merged
  -b, --body string          Body for the pull request
  -F, --body-file file       Read body text from file (use "-" to read from standard input)
  -d, --draft                Mark pull request as a draft
      --dry-run              Print details instead of creating the PR. May still push git changes.
  -e, --editor               Skip prompts and open the text editor to write the title and body in. The first line is the title and the remaining text is the body.
  -f, --fill                 Use commit info for title and body
      --fill-first           Use first commit info for title and body
      --fill-verbose         Use commits msg+body for description
  -H, --head branch          The branch that contains commits for your pull request (default [current branch])
  -l, --label name           Add labels by name
  -m, --milestone name       Add the pull request to a milestone by name
      --no-maintainer-edit   Disable maintainer's ability to modify pull request
  -p, --project title        Add the pull request to projects by title
      --recover string       Recover input from a failed run of create
  -r, --reviewer handle      Request reviews from people or teams by their handle
  -T, --template file        Template file to use as starting body text
  -t, --title string         Title for the pull request
  -w, --web                  Open the web browser to create a pull request

INHERITED FLAGS
      --help                     Show help for command
  -R, --repo [HOST/]OWNER/REPO   Select another repository using the [HOST/]OWNER/REPO format

EXAMPLES
  $ gh pr create --title "The bug is fixed" --body "Everything works again"
  $ gh pr create --reviewer monalisa,hubot  --reviewer myorg/team-name
  $ gh pr create --project "Roadmap"
  $ gh pr create --base develop --head monalisa:feature
  $ gh pr create --template "pull_request_template.md"

LEARN MORE
  Use `gh <command> <subcommand> --help` for more information about a command.
  Read the manual at https://cli.github.com/manual
  Learn about exit codes using `gh help exit-codes

FYI the GitHub cli help command is great for that kind of stuff, you shouldn't necessarily need to take time to learn their API 😅

@targos
Copy link
Member Author

targos commented Dec 6, 2024

Yes, it's in gh pr create, but the script was changed in #56054 to use gh api instead!

@ruyadorno
Copy link
Member

Yes, it's in gh pr create, but the script was changed in #56054 to use gh api instead!

oh noes!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
meta Issues and PRs related to the general management of the project. tools Issues and PRs related to the tools directory.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants