feat: add assignees option to the copy and backport commands#2336
Conversation
|
Similar to #2334. I've no clue how to test this locally, though my changes in the test data were good enough 👑 |
sileht
left a comment
There was a problem hiding this comment.
Maybe we can be more generic like assign action does, for example:
voluptuous.Required("assignees", default[]: [types.Jinja2])
And then the configuration will look like this:
backport:
assignees: ["{{ author }}"]
What do you think?
|
@v1v this pull request is now in conflict 😩 |
| f.write( | ||
| f"""<head> | ||
| <meta http-equiv="refresh" content="0; URL={url}"> | ||
| <link rel="canonical" href="{url}"> | ||
| </head> | ||
| """) | ||
| """ | ||
| ) |
There was a problem hiding this comment.
Unrelated change caused by the tox -e black command
e646b00 to
80754d1
Compare
|
I've just changed the implementation to use the suggestion from #2336 (review) Though, I might need some help with the test data |
|
Fixtures for the functional need to setup a GitHub app and a couple of GitHub accounts and API keys. I will take care of it. |
sileht
left a comment
There was a problem hiding this comment.
I just post some remarks, but I have already fixed them locally. You don't have to fix them.
I'm currently generating the fixtures.
| json={"labels": effective_labels}, | ||
| ) | ||
|
|
||
| if assignees is not None: |
There was a problem hiding this comment.
Need also checks len(assignes) > 0 to avoid useless HTTP request
| f.write( | ||
| f"""<head> | ||
| <meta http-equiv="refresh" content="0; URL={url}"> | ||
| <link rel="canonical" href="{url}"> | ||
| </head> | ||
| """) | ||
| """ | ||
| ) |
80754d1 to
90bf0c2
Compare
| - The users to assign to the pull request. | ||
|
|
||
| The list of users in ``assignees`` is based on :ref:`data type template`, you can use | ||
| e.g. ``{{author}}`` to assign the pull request to its author. |
There was a problem hiding this comment.
| - The users to assign to the pull request. | |
| The list of users in ``assignees`` is based on :ref:`data type template`, you can use | |
| e.g. ``{{author}}`` to assign the pull request to its author. | |
| - Users to assign the newly created pull request. As the type is :ref:`data type template`, you could use, e.g., ``{{author}}`` to assign the pull request to its original author. |
| backport: | ||
| branches: | ||
| - stable | ||
| assignees: ["{{ author }}"] |
There was a problem hiding this comment.
| assignees: ["{{ author }}"] | |
| assignees: | |
| - "{{ author }}" |
I feel it's more readable :)
| * - ``assignees`` | ||
| - list of :ref:`data type template` | ||
| - | ||
| - The users to assign to the pull request. | ||
|
|
||
| The list of users in ``assignees`` is based on :ref:`data type template`, you can use | ||
| e.g. ``{{author}}`` to assign the pull request to its author. |
90bf0c2 to
791fd5c
Compare
Description of the change
Add assignees option to the copy and backport commands
Related issues
Fix #2287
Checklists
Development
hotfixlabelCode Review
Code review policies are handled and automated by Mergify.
remaining, pull request is retested against its base branch.