Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] .github/workflows: disable scheduled cron jobs on forks
@ 2022-05-29  4:28 Animeshz
  2022-05-30 20:22 ` dmarto
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: Animeshz @ 2022-05-29  4:28 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 531 bytes --]

There is a new pull request by Animeshz against master on the void-packages repository

https://github.com/Animeshz/void-packages cron-disable-on-forks
https://github.com/void-linux/void-packages/pull/37339

.github/workflows: disable scheduled cron jobs on forks
#### Testing the changes
- I tested the changes in this PR: **briefly**

Donot runs the cron-jobs of `stale.yml` and `cycles.yml` outside the `void-linux` repository-owner.

A patch file from https://github.com/void-linux/void-packages/pull/37339.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-cron-disable-on-forks-37339.patch --]
[-- Type: text/x-diff, Size: 1242 bytes --]

From d00b8308de8d993a63d1c4dc6e32c53d2cc63f44 Mon Sep 17 00:00:00 2001
From: Animesh Sahu <animeshsahu19@yahoo.com>
Date: Sun, 29 May 2022 09:55:39 +0530
Subject: [PATCH] .github/workflows: disable scheduled cron jobs on forks

---
 .github/workflows/cycles.yml | 1 +
 .github/workflows/stale.yml  | 1 +
 2 files changed, 2 insertions(+)

diff --git a/.github/workflows/cycles.yml b/.github/workflows/cycles.yml
index 0bd148e77f0a..67045b2ee35f 100644
--- a/.github/workflows/cycles.yml
+++ b/.github/workflows/cycles.yml
@@ -7,6 +7,7 @@ on:
 jobs:
   cycles:
     runs-on: ubuntu-latest
+    if: github.event_name != 'schedule' || (github.event_name == 'schedule' && github.repository_owner == 'void-linux')
     container:
         image: 'ghcr.io/void-linux/xbps-src-masterdir:20220527RC01-x86_64-musl'
     steps:
diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml
index 160897fedef1..d5f8edd83d88 100644
--- a/.github/workflows/stale.yml
+++ b/.github/workflows/stale.yml
@@ -9,6 +9,7 @@ on:
 jobs:
   stale:
     runs-on: ubuntu-latest
+    if: github.event_name != 'schedule' || (github.event_name == 'schedule' && github.repository_owner == 'void-linux')
     steps:
       - uses: actions/stale@v4
         with:

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: .github/workflows: disable scheduled cron jobs on forks
  2022-05-29  4:28 [PR PATCH] .github/workflows: disable scheduled cron jobs on forks Animeshz
@ 2022-05-30 20:22 ` dmarto
  2022-05-30 20:47 ` dmarto
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: dmarto @ 2022-05-30 20:22 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1031 bytes --]

New comment by dmarto on void-packages repository

https://github.com/void-linux/void-packages/pull/37339#issuecomment-1141457399

Comment:
You can stop *all* actions from the settings of your fork (if you don't want them), while if you want to keep them, you will have to maintain a commit that undoes that. I for one, want to keep the cycle action in my fork, as I do use my master branch for personal packages. 

And in general, I am not a fan of embedding such "code actions" i.e the code shouldn't care in which repo it is or who is the owner of the repo. At least in my mind, when I fork something I expect 1:1. (off-topic, I bet some may will find it fun to use an action that deletes commit if inside forks - DRM by GithubAction (trademark pending))

Anyway, if the larger consensus is that this is better, I won't be mad or sad; I will simply revert it for myself. 

P.S
```yaml
if: github.repository_owner == 'void-linux' || github.event_name != 'schedule'
```
is a more clear version (disclaimer, not tested).

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: .github/workflows: disable scheduled cron jobs on forks
  2022-05-29  4:28 [PR PATCH] .github/workflows: disable scheduled cron jobs on forks Animeshz
  2022-05-30 20:22 ` dmarto
@ 2022-05-30 20:47 ` dmarto
  2022-05-31  3:19 ` Animeshz
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: dmarto @ 2022-05-30 20:47 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1372 bytes --]

New comment by dmarto on void-packages repository

https://github.com/void-linux/void-packages/pull/37339#issuecomment-1141457399

Comment:
You can stop *all* actions from the settings of your fork (if you don't want them), while if you want to keep them, you will have to maintain a commit that undoes that. I for one, want to keep the cycle action in my fork, as I do use my master branch for personal packages. 

And in general, I am not a fan of embedding such "code actions" i.e the code shouldn't care in which repo it is or who is the owner of the repo. At least in my mind, when I fork something I expect 1:1. (off-topic, I bet some may will find it fun to use an action that deletes commit if inside forks - DRM by GithubAction (trademark pending))

Anyway, if the larger consensus is that this is better, I won't be mad or sad; I will simply revert it for myself. 

P.S
```yaml
if: github.repository_owner == 'void-linux' || github.event_name != 'schedule'
```
is a more clear version (disclaimer, not tested).

---
EDIT

For the `stale` workflow, it does make sense to have it disabled; and there for sure isn't any use inside forks. 

On another note, most existing forks will probably never get this change; as most people fork and rarely update (and push) master, so if the reason is saving resources for GitHub, it is not a good reason. 


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: .github/workflows: disable scheduled cron jobs on forks
  2022-05-29  4:28 [PR PATCH] .github/workflows: disable scheduled cron jobs on forks Animeshz
  2022-05-30 20:22 ` dmarto
  2022-05-30 20:47 ` dmarto
@ 2022-05-31  3:19 ` Animeshz
  2022-05-31  3:27 ` classabbyamp
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Animeshz @ 2022-05-31  3:19 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1150 bytes --]

New comment by Animeshz on void-packages repository

https://github.com/void-linux/void-packages/pull/37339#issuecomment-1141627495

Comment:
> You can stop all actions from the settings of your fork (if you don't want them), while if you want to keep them, you will have to maintain a commit that undoes that

I mean you have a manual workflow dispatch trigger which should 'just work' in case you want it to... I just prefer not to run the scheduled cron jobs on all the possible forks which may not expect it to run.

> I for one, want to keep the cycle action in my fork, as I do use my master branch for personal packages.

Its also better to have a [seperate repository](https://github.com/Animeshz/void-xpackages) for personal packages (not yet reviewed, or some not even acceptable - e.g. packages that don't tag them as versions), because seperate repository will give a proper overview what packages have been added, and you can easily track their updates if you want to, and add custom actions.

> most existing forks will probably never get this change;

Probably right but change for good always have a positive impact overall

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: .github/workflows: disable scheduled cron jobs on forks
  2022-05-29  4:28 [PR PATCH] .github/workflows: disable scheduled cron jobs on forks Animeshz
                   ` (2 preceding siblings ...)
  2022-05-31  3:19 ` Animeshz
@ 2022-05-31  3:27 ` classabbyamp
  2022-05-31  3:34 ` Animeshz
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: classabbyamp @ 2022-05-31  3:27 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 544 bytes --]

New comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/37339#issuecomment-1141630967

Comment:
> Its also better to have a [seperate repository](https://github.com/Animeshz/void-xpackages) for personal packages

the way you do this will not work for anything that provides shlibs used by other packages, because of how `common/shlibs` and xbps(-src) shlib handling works.

fwiw I just keep packages that aren't submitted to the repos on other branches of my fork, rebasing them as needed.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: .github/workflows: disable scheduled cron jobs on forks
  2022-05-29  4:28 [PR PATCH] .github/workflows: disable scheduled cron jobs on forks Animeshz
                   ` (3 preceding siblings ...)
  2022-05-31  3:27 ` classabbyamp
@ 2022-05-31  3:34 ` Animeshz
  2022-05-31  4:00 ` 0x5c
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Animeshz @ 2022-05-31  3:34 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 345 bytes --]

New comment by Animeshz on void-packages repository

https://github.com/void-linux/void-packages/pull/37339#issuecomment-1141633398

Comment:
Seems interesting, I'd probably put a copy of shlib diff on the repo. I still don't think personal packages should be next to official packages, its more hard to deal with later on (e.g. version bumps).

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: .github/workflows: disable scheduled cron jobs on forks
  2022-05-29  4:28 [PR PATCH] .github/workflows: disable scheduled cron jobs on forks Animeshz
                   ` (4 preceding siblings ...)
  2022-05-31  3:34 ` Animeshz
@ 2022-05-31  4:00 ` 0x5c
  2022-08-30  2:14 ` github-actions
  2022-09-13  2:15 ` [PR PATCH] [Closed]: " github-actions
  7 siblings, 0 replies; 9+ messages in thread
From: 0x5c @ 2022-05-31  4:00 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 627 bytes --]

New comment by 0x5c on void-packages repository

https://github.com/void-linux/void-packages/pull/37339#issuecomment-1141643002

Comment:
> I still don't think personal packages should be next to official packages, its more hard to deal with later on (e.g. version bumps).

As someone who has a number of custom packages, my experience definitely doesn't reflect that. Custom packages live on separate branches (one per package, group of packages when some depend on others), and doing revision/version bumps only requires rebasing from the master branch. The custom packages don't affect normal packaging operations either.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: .github/workflows: disable scheduled cron jobs on forks
  2022-05-29  4:28 [PR PATCH] .github/workflows: disable scheduled cron jobs on forks Animeshz
                   ` (5 preceding siblings ...)
  2022-05-31  4:00 ` 0x5c
@ 2022-08-30  2:14 ` github-actions
  2022-09-13  2:15 ` [PR PATCH] [Closed]: " github-actions
  7 siblings, 0 replies; 9+ messages in thread
From: github-actions @ 2022-08-30  2:14 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 305 bytes --]

New comment by github-actions[bot] on void-packages repository

https://github.com/void-linux/void-packages/pull/37339#issuecomment-1231060880

Comment:
Pull Requests become stale 90 days after last activity and are closed 14 days after that.  If this pull request is still relevant bump it or assign it.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PR PATCH] [Closed]: .github/workflows: disable scheduled cron jobs on forks
  2022-05-29  4:28 [PR PATCH] .github/workflows: disable scheduled cron jobs on forks Animeshz
                   ` (6 preceding siblings ...)
  2022-08-30  2:14 ` github-actions
@ 2022-09-13  2:15 ` github-actions
  7 siblings, 0 replies; 9+ messages in thread
From: github-actions @ 2022-09-13  2:15 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 364 bytes --]

There's a closed pull request on the void-packages repository

.github/workflows: disable scheduled cron jobs on forks
https://github.com/void-linux/void-packages/pull/37339

Description:
#### Testing the changes
- I tested the changes in this PR: **briefly**

Donot runs the cron-jobs of `stale.yml` and `cycles.yml` outside the `void-linux` repository-owner.

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2022-09-13  2:15 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-29  4:28 [PR PATCH] .github/workflows: disable scheduled cron jobs on forks Animeshz
2022-05-30 20:22 ` dmarto
2022-05-30 20:47 ` dmarto
2022-05-31  3:19 ` Animeshz
2022-05-31  3:27 ` classabbyamp
2022-05-31  3:34 ` Animeshz
2022-05-31  4:00 ` 0x5c
2022-08-30  2:14 ` github-actions
2022-09-13  2:15 ` [PR PATCH] [Closed]: " github-actions

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).