Commit Graph

40 Commits

Author SHA1 Message Date
Nizamudeen A
3441b89ad4 .github: fix add to dashboard failing
```
Error: Request failed due to following response errors:
 - Could not resolve to a ProjectV2 with the number 2.
```

On further investigation, it looks like it could be a permission issue.
I followed the recommendation in their documentation to fix it: https://github.com/actions/add-to-project#creating-a-pat-and-adding-it-to-your-repository

Signed-off-by: Nizamudeen A <nia@redhat.com>
2023-08-14 23:23:11 +05:30
Nizamudeen A
38ee272419 .github: pr-triage broken link fix
The link I put was broken so replacing it with the correct one:

Fixes: https://github.com/ceph/ceph/pull/52455

Signed-off-by: Nizamudeen A <nia@redhat.com>
2023-08-08 10:34:59 +05:30
Nizamudeen A
a0ccdd411a
Merge pull request #52455 from ceph/gh-add-to-project-fix
.github: pr-triage fix

Reviewed-by: Aashish Sharma <aasharma@redhat.com>
2023-08-08 10:09:54 +05:30
Nizamudeen A
a54af94f6a .github: pr-triage fix
Signed-off-by: Nizamudeen A <nia@redhat.com>
2023-08-07 21:17:43 +05:30
Laura Flores
f32988e0c3 .github/workflows: pin the stale bot to the latest version
Signed-off-by: Laura Flores <lflores@redhat.com>
2023-08-01 15:03:30 -05:00
Ernesto Puerta
c9a7e7158e
.github: update add-to-project action
Signed-off-by: Ernesto Puerta <37327689+epuertat@users.noreply.github.com>
2023-02-27 16:01:33 +01:00
Ernesto Puerta
2d11e4770a
.github/workflows: update failing action
[Example](https://github.com/ceph/ceph/actions/runs/4222995073/jobs/7360873373) of failing run.

Signed-off-by: Ernesto Puerta <37327689+epuertat@users.noreply.github.com>
2023-02-21 20:47:31 +01:00
Laura Flores
2f8b6d6cb6
.github/workflows: update days-before-pr-close
Currently, the stale bot closes PRs 90 days after they are marked stale since it counts "marking a PR stale" as activity. 

We really want the PRs to close after a total of 90 days, or 30 days after they are marked stale. Changing `days-before-prs-close` to 30 will fix this.

Signed-off-by: Laura Flores <lflores@redhat.com>
2022-10-28 13:24:33 -05:00
Ernesto Puerta
d6a2266fbb
.github/pr-triage: update node.js to v16
[Warning](https://github.com/ceph/ceph/actions/runs/3273201887):
```
Node.js 12 actions are deprecated. For more information see: https://github.blog/changelog/2022-09-22-github-actions-all-actions-will-begin-running-on-node16-instead-of-node12/.
Please update the following actions to use Node.js 16: actions/labeler, iyu/actions-milestone
```

Signed-off-by: Ernesto Puerta <37327689+epuertat@users.noreply.github.com>
2022-10-18 14:50:39 +02:00
Ernesto Puerta
f846400652
.github/pr-triage: switch from old to new project
The old (classic) Dashboard project (https://github.com/ceph/ceph/projects/6) has been migrated to a new-style one (https://github.com/orgs/ceph/projects/2/views/1).

This also requires updating the GH Action that automatically assigned `dashboard`-labeled PRs to the Dashboard project.

Signed-off-by: Ernesto Puerta <37327689+epuertat@users.noreply.github.com>
2022-10-17 17:50:41 +02:00
David Galloway
41fcdd9a5b .github: Give folks 30 seconds to fill out the checklist
Otherwise GitHub sends an annoying e-mail right away when you file a PR that doesn't have the checklist filled out.  It's easier IMO to create the PR, then check the boxes instead of putting Xes in brackets while filling out the PR comment.

Signed-off-by: David Galloway <dgallowa@redhat.com>
2022-08-31 14:21:16 -04:00
Ernesto Puerta
ee1e163b1e
Merge pull request #47479 from ceph/wip-backportbot_script-main
.github/workflows: add create-backport action

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Reviewed-by: David Galloway <dgallowa@redhat.com>
Reviewed-by: Ilya Dryomov <idryomov@redhat.com>
Reviewed-by: Laura Flores <lflores@redhat.com>
2022-08-10 14:40:18 +02:00
Ernesto Puerta
a92bf26f05
.github/workflows: add create-backport action
Currently there's a cron job in a teuthology VM running a script to find all trackers in needs-backports and to create their corresponding backport trackers. This is done through the [Backport Bot](https://tracker.ceph.com/users/12172) Redmine account.

This PR intends to run this cron job task as a periodic Github Action.

Signed-off-by: Ernesto Puerta <37327689+epuertat@users.noreply.github.com>
Signed-off-by: Ernesto Puerta <epuertat@redhat.com>
2022-08-10 13:09:52 +02:00
Laura Flores
0f31bf10f8 .github/workflows: increase operations-per-run to 100 in stale bot
The stale bot's `operations-per-run`
(https://github.com/actions/stale#operations-per-run) corresponds to the max
number of API calls it is allowed to make per hour. Currently,
`operations-per-run` is set to 30, which means that the stale bot
can make up to 30 API calls per hour.

With this limit in place, the stale bot is only able to process 400 PRs at a time.
Since there are 900+ PRs in the Ceph repository, we should increase the number of
operations to cover them all. This needs to be done with care though, since GitHub
has a rate limit
(https://docs.github.com/en/rest/overview/resources-in-the-rest-api#rate-limiting)
depending on business plan.

According to GitHub's documentation on GitHub action requests
(https://docs.github.com/en/rest/overview/resources-in-the-rest-api#requests-from-github-actions),
the rate limit is 1,000 requests per hour per repository when using `GITHUB_TOKEN` (which we are).
For enterprise accounts, GitHub Enterprise Cloud's rate limit applies, and the limit is 15,000
requests per hour per repository.

Based on this information, we should be fine to increase the max `operations-per-run`
to 100. This would cover a little over 1000 PRs, which should be enough
to process the 900-some-odd PRs in the Ceph repository.

Signed-off-by: Laura Flores <lflores@redhat.com>
2022-08-05 11:34:20 -05:00
Laura Flores
49284d6358 .github/workflows: run the stale bot every hour
Currently, the stale bot runs once a day at 1:30 UTC.
This will only process a few PRs per day, which is not
enough to handle the volume of PRs that come into the
Ceph repository. Running the bot once every hour with
a limit of 30 operations will keep within the rate
limit, but it will also process more PRs per day.

Followup to 1a8d201037.

Signed-off-by: Laura Flores <lflores@redhat.com>
2022-07-07 12:19:08 -05:00
Sébastien Han
1a8d201037 .github/workflows: process PRs in ascending order
The Ceph repo has many PRs and we cannot process all the PRs with the
default "operations-per-run" value (30). At the time of writting the bot
processes 408 every day and there are around 938 PRs.
Even the job informs us that not enough PRs might have been processed
and encouraged us to increase "operations-per-run" if possible. However
it might expose us to Github's API rate limit.
So let's operate with the oldest PRs first, this should close a bunch of
PRs already. If not enough we can try to increase "operations-per-run".

Signed-off-by: Sébastien Han <seb@redhat.com>
2022-07-06 17:21:07 +02:00
David Galloway
f8357dd6d0 Revert ".github: Label doc/releases PRs so tibdex/backport@v2 can backport"
This reverts commit 24e3822435.

Signed-off-by: David Galloway <dgallowa@redhat.com>
2022-06-30 17:20:05 -04:00
David Galloway
928d935b74 Revert ".github: Support for automatically creating backport PRs when labeled"
This reverts commit f5f9459fb2.

Signed-off-by: David Galloway <dgallowa@redhat.com>
2022-06-30 17:19:58 -04:00
David Galloway
3e238b83ec Revert ".github: Add labels while PR is open"
This reverts commit 605b457c98.

Signed-off-by: David Galloway <dgallowa@redhat.com>
2022-06-30 17:19:36 -04:00
David Galloway
605b457c98 .github: Add labels while PR is open
I think https://github.com/tibdex/backport will only create backport PRs if our doc/releases PRs are labelled *and then* closed.  This action currently labels after the PR is closed.

Signed-off-by: David Galloway <dgallowa@redhat.com>
2022-06-24 12:27:43 -04:00
David Galloway
f5f9459fb2 .github: Support for automatically creating backport PRs when labeled
e.g., add a 'backport quincy' label to a PR and this workflow will automatically create a backport PR

Signed-off-by: David Galloway <dgallowa@redhat.com>
2022-06-23 15:33:54 -04:00
David Galloway
24e3822435 .github: Label doc/releases PRs so tibdex/backport@v2 can backport
Signed-off-by: David Galloway <dgallowa@redhat.com>
2022-06-23 15:31:48 -04:00
Ernesto Puerta
d8c0229b90
.github/pr-triage: reorder milestone step
In `master` the milestone step exits and causes remaining tasks not to be run. I previously tried with the `continue-on-error` flag, but it didn't work, so let's try putting that steps at the end.

Signed-off-by: Ernesto Puerta <epuertat@redhat.com>
2022-04-18 18:50:52 +02:00
Laura Flores
ea290a4025
Merge pull request #45230 from ljflores/wip-github-actions-stale
.github/workflows: replace probot-stale with equivalent github action
2022-03-23 11:37:38 -05:00
Ernesto Puerta
b6791ee09a
.github: continue on error
Signed-off-by: Ernesto Puerta <epuertat@redhat.com>
2022-03-17 20:53:31 +01:00
Laura Flores
97ba9ccf8e .github/workflows: replace probot-stale with equivalent github action
We currently use probot-stale (https://github.com/probot/stale) to mark stale PRs. According to several issues reported for this repository, there is a widespread problem of probot-state not working properly in github projects (i.e. https://github.com/probot/stale/issues/349). Some users recommend using https://github.com/actions/stale instead.

Fixes: https://tracker.ceph.com/issues/54443
Signed-off-by: Laura Flores <lflores@redhat.com>
2022-03-02 20:03:56 +00:00
Sage Weil
f0af2a7535 .github/workflows/pr-checklist: add checklist action
Signed-off-by: Sage Weil <sage@newdream.net>
2021-11-03 13:26:04 -05:00
Ernesto Puerta
e7cbf30387
Merge pull request #43473 from rhcs-dashboard/wip-pr_deps-master
.github: check if PR deps are merged/closed

Reviewed-by: Avan Thakkar <athakkar@redhat.com>
Reviewed-by: Nizamudeen A <nia@redhat.com>
2021-10-11 14:52:02 +02:00
Ernesto Puerta
2220646c20
.github/pr-triage: rename GH token
Repo projects use GITHUB_TOKEN instead of MY_GITHUB_TOKEN:
https://github.com/srggrs/assign-one-project-github-action/blob/master/entrypoint.sh#L19

Signed-off-by: Ernesto Puerta <epuertat@redhat.com>
2021-10-11 13:05:34 +02:00
Ernesto Puerta
61011a43a3
.github: check if PR deps are merged/closed
If a PR description includes `blocked by <pr>` or `depends on <pr>`,
this check will fail until the referred PRs are either merged or closed.

If this check is made required, it'll also block the merge button.

The details of the supported syntax can be checked at:
https://github.com/marketplace/actions/pr-dependency-check

Signed-off-by: Ernesto Puerta <epuertat@redhat.com>
2021-10-08 19:14:17 +02:00
Ernesto Puerta
ed55c527f1
.github: add dashboard PRs to Dashboard project
This action automatically adds PRs with 'dashboard' label to the
'Dashboard' project (https://github.com/ceph/ceph/projects/6).

Signed-off-by: Ernesto Puerta <epuertat@redhat.com>
2021-10-08 18:43:25 +02:00
Kefu Chai
ae8ea10f41 .github/workflows: use a released sha1
otherwise the action cannot be found

Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-03-09 12:16:26 +08:00
Kefu Chai
453cd5fd60 .github/workflows: rename labeler.yml to pr-triage.yml
to reflect the change in the actions in it.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-03-09 02:46:48 +08:00
Kefu Chai
79e8038046 .github/workflows: use @{sha1} for actions
more secure this way. see also https://julienrenaux.fr/2019/12/20/github-actions-security-risk/

point the sha1 to

* labeler@v3
* milestone@main HEAD

Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-03-09 02:46:10 +08:00
Kefu Chai
98b9018979 .github/workflows: move milestone.yml into labeler.yml
no need to have two actions triggered by the same event.

we could backport this labeler.yml to LTS branches.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-03-09 02:45:52 +08:00
Kefu Chai
c5f6d15e36 .github: correct the regex in mileston workflow
also use pull_request_target event so the action is run in the
context of the base of the pull request. this helps us to overcome
the "Resource not accessible by integration" issue where the action
is run in the context of the pull request.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-03-07 00:32:44 +08:00
Kefu Chai
1657a44750 .github: add workflow for adding milestone
Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-03-06 21:36:53 +08:00
Ernesto Puerta
4c6bd8dd3b
github: add action to manage needs-rebase label
Fixes: https://tracker.ceph.com/issues/48570
Signed-off-by: Ernesto Puerta <epuertat@redhat.com>
2020-12-15 19:09:28 +01:00
Ernesto Puerta
59702b6198
github/labeler: disable sync-labels
Yaml syntax cleaned too.

Fixes: https://github.com/ceph/ceph/pull/38107#issuecomment-729300615
Signed-off-by: Ernesto Puerta <epuertat@redhat.com>
2020-11-18 13:15:41 +01:00
Ernesto Puerta
298bc67f7b
github: autolabel PRs
... starting with dashboard ones.

Requires https://github.com/marketplace/actions/labeler

Signed-off-by: Ernesto Puerta <epuertat@redhat.com>
2020-11-12 19:06:28 +01:00