135 Commits

Author SHA1 Message Date
Tom Stellard
5e4e2a5aae
workflows/pr-receive: Ignore pull requests with 10 or more commits (#66320)
This will cause the auto-labeler not to run on pull requests with more
than 10 commits. Usually larger pull requests like this are mistakes and
we want to avoid generating an excessive amount of notifications.

It may be possible for legitimate pull requests to have 10 or more
commits from people pushing fixup commits to addresss review comments.
However, these pull requests should already have the correct labels by
the time they grow to 10 commits.
2023-09-16 07:45:50 -07:00
Corentin Jabot
a59870a05c [Github] Fix yml syntax 2023-09-16 12:27:08 +02:00
cor3ntin
f3796acd77
[Github] Do not label clang-format files as clang (#66388) 2023-09-16 11:04:00 +02:00
Markus Böck
6af7bf6953
[GitHub] Fix mlir:core label definition (#66556)
The current regex for the `mlir:core` PR label is too accepting. It uses
`**` as a prefix for all paths, which allows any kind of directory
prefix to be inserted when matching. Combined with very common directory
suffixes such as `IR` and `Transforms`, it leads to many false positives
of being applied to PRs that do not touch MLIR core such as
https://github.com/llvm/llvm-project/pull/66520

This PR therefore changes the `mlir:core` labels to only include the
specified top-level directories if directly nested under either `lib`
for source files, or `include` for header files
2023-09-16 00:41:51 +02:00
Louis Dionne
8f44edbd24
[runtimes] Add CODEOWNERS entries for libc++, libc++abi and libunwind (#66416)
This ensures that a review from the appropriate teams is requested on
PRs that modify files belonging to these projects.

Relevant discussion: https://discourse.llvm.org/t/changes-to-pull-request-subscription-system
2023-09-15 16:15:26 -04:00
cor3ntin
6c8243060d
[Github] Use our own issue labeler fork (#65900)
- Only adds 'new issue' if no other label is added
(https://github.com/llvm/llvm-project/issues/65701)

- No not add labels if labels were already set
- Only add `foo` if there are no `foo:bar` label being added (although,
we don't use that yet)

Fixes #65701
2023-09-15 18:14:11 +02:00
Jakub Kuderski
63327fa814
[GitHub] Add teams for ADT and Support (#65519) 2023-09-15 10:09:02 -04:00
Nathan Gauër
71d6d81a19
[Github] add spirv backend team (#66075)
This PR adds the paths the SPIR-V backend folks maintains. (Another
distince SPIR-V team exists, but only for the MLIR part (mlir-spirv).

---------

Signed-off-by: Nathan Gauër <brioche@google.com>
2023-09-15 13:17:06 +02:00
Jakub Kuderski
ae84b160d2
[GitHub][mlir][spirv] Add missing patterns for SPIR-V in mlir (#66423)
Include conversion passes and tools.
2023-09-14 17:06:03 -04:00
Justin Bogner
11f0a63267 [github] Simplify DirectX backend labeling (#66407)
Based on how AMDGPU and RISCV set up their labels - this way does a
better job of catching everything with less maintenance burden.
2023-09-14 11:05:25 -07:00
Louis Dionne
892f955d48
[github] Label PRs touching CMake-related files with the 'cmake' tag (#66247) 2023-09-14 08:06:36 -04:00
Tom Stellard
c532db0133
workflows/pr-subscriber: Use our own custom concurrency implementation (#66263)
The builtin concurrency functionality for the workflows will cancel a
pending job if there is another job from the same workflow running. For
the pr-subscriber job, this means that if multiple labels are added at
the same time, then some of the pr-subscriber jobs will be cancelled and
the PR will not have all the necessary mentions.
2023-09-13 23:46:23 -07:00
Tom Stellard
c37414355f
Remove CODEOWNERS file and copy missing paths into new-prs-labeler.yml (#66145)
See https://discourse.llvm.org/t/changes-to-pull-request-subscription-system/73296/
2023-09-13 22:51:14 -07:00
Paul T Robinson
9d2e9ea491
Add label for third-party/unittests (#66276) 2023-09-13 11:58:11 -07:00
Paul T Robinson
47daf144f1
Update paths for debuginfo labeling (#66143)
Adds a bunch of stuff overlooked in the original setup. Steps back a
little on the llvm/lib/CodeGen/AsmPrinter paths.
2023-09-13 08:38:37 -04:00
Mohammed Keyvanzadeh
859e6aa100
[github] GitHub Actions workflows changes (#65856)
- Remove usages of the non-existent `ignore-forks` field, conditions in
jobs already exist to prevent the jobs from running in forks.
- Don't use variables in the `printf` format string. Use `printf
"..%s.." "$foo"`. ([SC2059](https://www.shellcheck.net/wiki/SC2059))
- Double quote variable expansion to prevent globbing and word
splitting. ([SC2086](https://www.shellcheck.net/wiki/SC2086))
- Prefer `[ p ] || [ q ]` as `[ p -o q ]` is not well defined.
([SC2166](https://www.shellcheck.net/wiki/SC2166))
- Consider `{ cmd1; cmd2; } >> file` instead of individual redirects.
([SC2129](https://www.shellcheck.net/wiki/SC2129))
- Use `$(...)` notation instead of legacy notation `...`.
([SC2006](https://www.shellcheck.net/wiki/SC2006))
- Use `./*glob*` or `-- *glob*` so names with dashes won't become
options. ([SC2035](https://www.shellcheck.net/wiki/SC2035))
- Refactor JavaScript code in certain workflows.
- Change workflow variable substitution style of some workflows to be
consistent with others.
2023-09-13 01:51:47 +03:30
Paul T Robinson
9d0291d5ab
[NFC] Sort debuginfo paths prior to updating the list (#66140) 2023-09-12 13:47:29 -07:00
Tom Stellard
64751ea2c5
github-automation: Use a single comment for team mentions on pull requests (#66037)
This will reduce the number of notifications created when a pull request
label is added. Each team will only get a notification when their team's
label is added and not when other teams' labels are added.
2023-09-12 13:21:29 -07:00
Marc Auberer
6d2aaa5fdb
[GitHub] use checkout action v4 (#65819)
Upgrade checkout action to v4 to make use of node20.
Node 16, which v3 is using, reaches end of life on 2023-09-11.
2023-09-12 12:08:56 +02:00
Tom Stellard
91fdb20915 workflows: Split new-prs into two workflows
We cannot use the default github token for labeling PRs, because this
will not trigger the PR Subscriber job.  However, we weren't allowed to
use a different token via a secret, because secrets aren't allowed
in PR workflows.

The solution is to create two workflows, the first accepts the
pull_request_taget event extracts the PR number and then starts
the second workflow which adds the labels to the PRs.

This separation ensures that nothing malicious in the first workflow is
able to access the secret we use in the second workflow.
2023-09-08 22:09:33 -07:00
Tom Stellard
adfd4a2b0e new-prs-labeler: Convert from gitignore syntax to minimatch 2023-09-08 15:40:21 -07:00
Tom Stellard
1ed710836a workflows: Reconfigure pr-subscriber action so that it can access secrets
Secrets are not available for workflows triggered by PRs, so we need
to split the pr-subscriber action into two separate actions.  The
first will listen for new labels on PRs and the second will add
a comment with the team mention.

See https://securitylab.github.com/research/github-actions-preventing-pwn-requests/
2023-09-08 11:55:59 -07:00
Tom Stellard
ea98e1c537 workflows/pr-subscriber: Limit action to llvm/llvm-project repo 2023-09-08 10:41:06 -07:00
Tom Stellard
dc9a1f0b02 new-prs-labeler: Remove leading slashes from paths
The labeler doesn't seem to support these.
2023-09-08 10:26:08 -07:00
Tom Stellard
e7fa52adcf workflows: Fix typo in pr-subscriber 2023-09-08 10:00:21 -07:00
Tom Stellard
b4ee25025b Fix up some yaml errors after 5f16a3a489bd1730db49f635604bc1d833abed15 2023-09-08 09:49:03 -07:00
Tom Stellard
5f16a3a489
workflows: Add a simple pull request subscription workflow (#64913)
This new workflow will make it possible for people to subscribe to pull
requests based on the labels that are added. Labels will be added
automatically to the pull requests based on the modified files and each
label will be associated with a GitHub team that will be notified when
the label is added.

See
https://discourse.llvm.org/t/changes-to-pull-request-subscription-system/73296
2023-09-08 09:40:37 -07:00
Tobias Hieta
d55ac38ace
Add GitHub workflow for check Python file formatting (#65482)
Using darker which is doing black on diffs, similar to git-clang-format.
2023-09-08 18:22:20 +02:00
Marius Brehler
3ac4ba37c0
[Github] Add mlir-emitc subscribers to watch the Cpp target (#65603) 2023-09-08 12:06:23 +02:00
Aiden Grossman
785e5737c6
[Github] Add test directories to IR/Transforms/Analysis teams (#65196)
Having test directories included for notifications sent out to these
teams seems like a decent idea. I don't think it should produce much
churn and it catches a couple cases like separately reviewed
pre-committed tests that aren't frequent but do exist.
2023-09-08 00:13:01 -07:00
Fangrui Song
11c07ce3a6
Add llvm-binary-utilities to .github/CODEOWNERS (#65545)
From
https://discourse.llvm.org/t/input-needed-teams-for-pull-request-subscriptions/73116/3
2023-09-07 15:30:44 -07:00
Markus Böck
38c5d231cb
[GitHub] Add main LLVM Dialect path to MLIR LLVM PR subscribers (#65513)
The LLVM Dialect in MLIR, which the `mlir-llvm` team is supposed to
provide notifications for, is 98% not nested in a directory called LLVM
but rather LLVMIR. The former only contains some tests.

This should make PRs such as
https://github.com/llvm/llvm-project/pull/65508 add the team as
codeowner.
2023-09-07 23:28:41 +02:00
Fangrui Song
5f8812389a Add lld-* to .github/CODEOWNERS
From https://discourse.llvm.org/t/input-needed-teams-for-pull-request-subscriptions/73116/6
They are somehow missing in latest updates of #65131.
2023-09-07 09:43:52 -07:00
David Spickett
3f3ee73f66
[lldb] Add lldb team to CODEOWNERS (#65454)
https://github.com/orgs/llvm/teams/pr-subscribers-lldb exists but wasn't
added to this file.
2023-09-07 09:03:22 +01:00
Derek Schuff
5458736b71
Add a GitHub team to subscribe to WebAssembly backend (#65419)
This also includes some files related to the Wasm binary and object file
format (which is technically distinct from the WebAssembly architecture,
but practically inseparable).
2023-09-05 16:00:12 -07:00
Matt Arsenault
695c59c4a2
Add amdgpu paths to CODEOWNERS (#65229) 2023-09-05 18:46:22 -04:00
Mehdi Amini
5d7b2bfe99
Add a GitHub team to subscribe to changes to MLIR Presburger library (#65294) 2023-09-05 14:08:10 -07:00
Matt Arsenault
a4a72bccac
Add regalloc team to CODEOWNERS (#65208)
Probably missed some cases. We also probably should rename the ML stuff
to use a consistent capitalization scheme
2023-09-05 16:53:05 -04:00
Alexander Richardson
eade41c453
[UpdateTestChecks] Add @llvm/pr-subscribers-testing-tools to CODEOWNERS (#65338) 2023-09-05 21:36:57 +01:00
cor3ntin
c144086997
[Github] Workaround a GH action bug causing manually added labels to be removed (#65395)
Fixes https://github.com/llvm/llvm-project/issues/65345
2023-09-05 20:46:41 +02:00
Corentin Jabot
a58c59e679 Revert "Update new-prs.yml"
This was meant to be a test in my personal fork...

This reverts commit ee53efde38a9d0283fb361e25a1c30a0e14c8ce9.
2023-09-05 19:30:11 +02:00
cor3ntin
ee53efde38
Update new-prs.yml 2023-09-05 19:05:46 +02:00
cor3ntin
d17e6cc9e7
[Github] Add labels on pull requests based on paths. (#65308)
Using https://github.com/actions/labeler, this add a workflow to
automatically label PRs, in hope to reduce the work needed to triage new
PRs.

"new-prs-labeler.yml" has been seeded taking inspiration from the
CODEOWNERS file when there was an existing corresponding label on the
issue tracker.
2023-09-05 15:26:48 +02:00
Corentin Jabot
836f2470fb [Github] Move the issue labeler data out of workflows
To avoid it being considered a workflow script.
2023-09-05 15:10:42 +02:00
pvanhout
1456dd1a65 Fix GlobalISel TableGen CODEOWNERS patterns
- GICombinerEmitter is no more, now it's GlobalISelCombinerEmitter
- Change the pattern so it also covers the MatchTable files
2023-09-05 15:09:15 +02:00
cor3ntin
3301edf45d
[Github] Improve automatic new issue labelling (#65309)
This patch:
* Replaces `andymckay/labeler` which does not appear to be maintained by
github official solution
* Removes the closed issue workflow which was disabled a few years ago
and never fixed.
* Adds a few rules to add label based on PR title, hopefully that can
make triaging simpler. If that turns out to be useful, we can consider
adding more rules for backends, etc. We could technically also pattern
match the body of the issue but I'm concerned about trying to be _too_
clever.

The new system is only triggered on PR open so manual labels should not
be removed.
2023-09-05 14:53:56 +02:00
Mehdi Amini
76a4474733 Fix some mlir CODEOWNERS patterns from the initial release
These are minor fixes from typos, duplications, etc.
2023-09-04 12:17:29 -07:00
Aiden Grossman
404d3066e2
[Github] Add llvm-exegesis PR subscribers team (#65199)
This allows for recieving notifications related to the llvm-exegesis
tool.
2023-09-04 12:12:18 -07:00
Craig Topper
54d6e958e7
[RISCV] Add more files to .github/CODEOWNERS (#65234) 2023-09-04 10:12:31 -07:00
Craig Topper
7dc199d8ee
[X86] Add more files to .github/CODEOWNERS (#65235) 2023-09-03 19:18:21 -07:00