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

Idea: @conda-bot please add news #673

Open
jaimergp opened this issue Jan 20, 2023 · 6 comments
Open

Idea: @conda-bot please add news #673

jaimergp opened this issue Jan 20, 2023 · 6 comments
Labels
backlog issue has been triaged but has not been earmarked for any upcoming release good first issue great for new contributors, code change is envisioned to be trivial/relatively straight-forward help-wanted we don't know the solution or we especially want a community member to contribute the code change source::contributor created by a frequent contributor source::partner created by or for an Anaconda, Inc. partner company type::feature request for a new feature or capability

Comments

@jaimergp
Copy link
Contributor

jaimergp commented Jan 20, 2023

What is the idea?

I find myself having to submit a PR to get its number, then going back to the IDE, create the news item with the correct filename, then find the issue it closes (if any)... It feels like all this could be vastly automated.

What about a workflow that responded to a PR comment like:

@conda-bot please add news

Then the workflow would create a news/TEMPLATE copy with filename <PR_NUMBER>-<PR_BRANCH_NAME>, and commit it to the PR. Then, one git pull after, you can edit the news. Or do it via a review comment with a suggestion.

An extended syntax could also allow to add the news from the message itself:

@conda-bot please add news
Bug fixes:

  • Fixed a problem with bla bla bla.

and take care of the references at the end of the bullet point?

Not too polished, but you get the idea I hope.

@jaimergp jaimergp added the type::feature request for a new feature or capability label Jan 20, 2023
@beeankha beeankha added source::contributor created by a frequent contributor source::partner created by or for an Anaconda, Inc. partner company labels Feb 20, 2023
@kenodegard
Copy link
Contributor

This is a fine idea and shouldn't be too hard to implement.

@kenodegard kenodegard added good first issue great for new contributors, code change is envisioned to be trivial/relatively straight-forward backlog issue has been triaged but has not been earmarked for any upcoming release labels Feb 22, 2023
@kenodegard kenodegard added in-progress issue is actively being worked on and removed backlog issue has been triaged but has not been earmarked for any upcoming release labels Mar 22, 2023
@kenodegard kenodegard moved this to 🏗️ In Progress in 🧭 Planning Mar 22, 2023
@beeankha beeankha removed the status in 🧭 Planning Aug 21, 2023
@beeankha beeankha added the help-wanted we don't know the solution or we especially want a community member to contribute the code change label Aug 21, 2023
@beeankha
Copy link
Member

This possible new workflow was extensively researched and tested, but it appears that we have hit a blocker; @conda-bot does not have the required permissions to push files to PRs, and this isn't something that we want to enable. There needs to be a way for the workflow to access pull request/working branch information, and this work seems a bit more complicated than we initially thought it would be.

The draft PR has been closed for now due to this blocker, but if anyone has ideas for how to implement this GHA workflow, they can reference that draft pull request to get some ideas and possibly build on top of it!

@kenodegard
Copy link
Contributor

while we cannot get this idea to work for @conda-bot, could we enable the workflow to run as whomever triggers it? if a maintainer leaves the comment it should work? or if the PR owner themselves leaves the comment it should work too?

@beeankha
Copy link
Member

while we cannot get this idea to work for @conda-bot, could we enable the workflow to run as whomever triggers it? if a maintainer leaves the comment it should work? or if the PR owner themselves leaves the comment it should work too?

Even as the PR author, I wasn't able to add a file to the pull request; the workflow would pick up the PR number successfully but then push the news file directly to the main branch. I might be missing something, but that's what I attempted to do in these lines in the test repo workflow while tinkering with this work.

@kenodegard kenodegard added backlog issue has been triaged but has not been earmarked for any upcoming release and removed in-progress issue is actively being worked on labels Aug 23, 2023
@schuylermartin45
Copy link

Alternatively, couldn't we have pre-commit generate this for us if we include an issue number in a commit?
I don't immediately see an existing hook to do this, but writing we could write our own or trigger a script/make directive easily through pre-commit.

I know part of this is to get the PR number, but wouldn't the SHA of the commit be enough for folks to to find the change and then the associated PR from the commit (I'm assuming we're not rebasing on merge, right?)

I'm sure we're not the only project on GitHub that has this problem, I'm sure there's a solution somebody has that we could adopt.

@schuylermartin45
Copy link

This seems relevant (Ken posted this in another conversation): #556

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backlog issue has been triaged but has not been earmarked for any upcoming release good first issue great for new contributors, code change is envisioned to be trivial/relatively straight-forward help-wanted we don't know the solution or we especially want a community member to contribute the code change source::contributor created by a frequent contributor source::partner created by or for an Anaconda, Inc. partner company type::feature request for a new feature or capability
Projects
Status: No status
Development

No branches or pull requests

5 participants