Skip to content

Commit

Permalink
.github/workflows/labels.yml: set event types
Browse files Browse the repository at this point in the history
opened, synchronize, reopened are the defaults for `pull_request_target`,
`edited` will trigger the label action if the PRs base branch is changed.
  • Loading branch information
zowoq committed Apr 2, 2021
1 parent cd016b7 commit 574c4a7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: "Label PR"

on:
pull_request_target:
types: [edited, opened, synchronize, reopened]

jobs:
labels:
Expand Down

14 comments on commit 574c4a7

@grahamc
Copy link
Member

@grahamc grahamc commented on 574c4a7 Apr 2, 2021

Choose a reason for hiding this comment

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

Please open a PR for these in the future.

@zowoq
Copy link
Contributor Author

@zowoq zowoq commented on 574c4a7 Apr 2, 2021

Choose a reason for hiding this comment

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

Are direct pushes disallowed now?

@grahamc
Copy link
Member

@grahamc grahamc commented on 574c4a7 Apr 2, 2021

Choose a reason for hiding this comment

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

Very strongly discouraged.

@zowoq
Copy link
Contributor Author

@zowoq zowoq commented on 574c4a7 Apr 2, 2021

Choose a reason for hiding this comment

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

It's very common practice on master and cherry picking to stable. Why comment on this commit?

@grahamc
Copy link
Member

@grahamc grahamc commented on 574c4a7 Apr 2, 2021

Choose a reason for hiding this comment

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

I comment on most of them. It is not very common practice.

@samueldr
Copy link
Member

Choose a reason for hiding this comment

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

Cherry-picking to stable is a different workflow than introducing new work. When cherry-picking to stable you're importing already approved changes in another branch.

@zowoq
Copy link
Contributor Author

@zowoq zowoq commented on 574c4a7 Apr 2, 2021

Choose a reason for hiding this comment

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

Cherry-picking to stable is a different workflow than introducing new work.

I didn't say it wasn't.

@grahamc
Copy link
Member

@grahamc grahamc commented on 574c4a7 Apr 2, 2021

Choose a reason for hiding this comment

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

Anyway, please use PRs and don't push to master directly.

@zowoq
Copy link
Contributor Author

@zowoq zowoq commented on 574c4a7 Apr 2, 2021

Choose a reason for hiding this comment

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

@grahamc Can you open an issue about this so we have something that is more visible and easier linked to?

@zowoq
Copy link
Contributor Author

@zowoq zowoq commented on 574c4a7 Apr 3, 2021

Choose a reason for hiding this comment

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

It is not very common practice.

For some committers pushing to master still seems to be their standard method for updating packages.

@domenkozar
Copy link
Member

Choose a reason for hiding this comment

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

Hey @zowoq, that's currently the case, but we're (slowly) moving towards using PRs.

There was already RFC proposed at NixOS/rfcs#79 that wasn't accepted as we need to figure out some stuff first.

@zowoq
Copy link
Contributor Author

@zowoq zowoq commented on 574c4a7 Apr 3, 2021

Choose a reason for hiding this comment

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

I'm aware on the RFC and that it wasn't accepted which is why I wanted clarification of the very brief comments:

Please open a PR for these in the future.

Very strongly discouraged.

For the record: I don't have a problem with the PR workflow for master/staging/etc.

If we're going to block pushing cherry picks to the release branch I probably won't bother doing many backports.

It's just very odd that an attempt is being made to enforce a PR workflow via comments on commits without any context?

@domenkozar
Copy link
Member

Choose a reason for hiding this comment

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

We warn people that push directly, sometimes via IRC, sometimes via commit comments, etc.

I don't think this is ideal, but it's still better to communicate what's the consensus where we'd like to end up, without the consensus how to get there.

If we're going to block pushing cherry picks to the release branch I probably won't bother doing many backports.

Using github cli that should be one extra command to run.

It's just very odd that an attempt is being made to enforce a PR workflow via comments on commits without any context?

I agree there should be a link with more explanation, so I opened #118661

@zowoq
Copy link
Contributor Author

@zowoq zowoq commented on 574c4a7 Apr 7, 2021

Choose a reason for hiding this comment

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

Using github cli that should be one extra command to run.

To open a PR. It still requires more steps to land it in the release branch.

Sure it's a trivial amount of time and effort but I basically don't care about stable so I'm not going to spend more time and effort on it than I currently am.

I'm only doing backports on some packages I maintain when I update them (e.g. the github cli tool) because it is low effort and I'll get pinged for issues and backport PRs anyway.

But I'm not looking to campaign against and/or otherwise try to impede the "no direct pushes" effort, as I said I'm fine with it for master/staging and I'll probably just ignore stable.

I agree there should be a link with more explanation, so I opened ...

Thanks, appreciated.

We warn people that push directly, sometimes via IRC, sometimes via commit comments, etc.

I don't think this is ideal, but it's still better to communicate what's the consensus where we'd like to end up, without the consensus how to get there.

Pinging the nixpkgs-committers team on the issue may be a better method?

Please sign in to comment.