Commit Graph

48 Commits

Author SHA1 Message Date
Matt Godbolt
335f556297 Fix Sentry CLI v3.0.0 breaking change (#8336)
## Summary
- Sentry CLI 3.0.0 removed the `releases files` subcommand
- Migrate to the new `sourcemaps upload --release` command syntax
- Fixes deploy failures:
https://github.com/compiler-explorer/compiler-explorer/actions/runs/20253797661/job/58151514156

See: https://github.com/getsentry/sentry-cli/releases/tag/3.0.0

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-15 20:26:03 -06:00
Matt Godbolt
4cb1416c2a Add gh_tool CLI for GitHub repository automation (#8170)
This PR adds a new Python CLI tool for automating GitHub repository
management tasks.

## Overview

The initial implementation provides duplicate issue detection using text
similarity analysis. This is the first step toward automating repository
triage tasks.

## Features

- **Click-based CLI** with subcommands for future extensibility
- **find-duplicates command** for detecting duplicate issues using text
similarity
- Uses **gh CLI** for GitHub API access (no token management needed)
- Text similarity using `difflib.SequenceMatcher` (ratio-based
algorithm)
- Configurable similarity threshold (default: 0.6)
- Progress bar for long-running comparisons
- Age filtering support (`--min-age` parameter)
- Standard Python src-layout with **uv** for dependency management
- **Comprehensive test suite** with pytest (integrated into CI)

## Project Structure

```
etc/scripts/gh_tool/
├── src/gh_tool/          # Main package
│   ├── cli.py            # Click-based CLI interface
│   └── duplicate_finder.py  # Core duplicate detection logic
├── tests/                # Test suite
│   └── test_duplicate_finder.py
├── docs/                 # Documentation
│   ├── TRIAGE-CRITERIA.md    # Triage guidelines from manual review
│   └── PHASE1-FINDINGS.md    # Historical analysis of 855 issues
├── pyproject.toml        # Package configuration
└── README.md             # Usage documentation
```

## Usage

```bash
cd etc/scripts/gh_tool
uv sync
uv run gh_tool find-duplicates /tmp/report.md
```

**Options:**
- `--threshold FLOAT` - Similarity threshold 0-1 (default: 0.6)
- `--state {all,open,closed}` - Issue state to check (default: open)
- `--min-age DAYS` - Only check issues older than N days (default: 0)
- `--limit INTEGER` - Maximum number of issues to fetch (default: 1000)
- `--repo TEXT` - GitHub repository in owner/repo format (default:
compiler-explorer/compiler-explorer)

**Example:**
```bash
# Find high-confidence duplicates in open issues
uv run gh_tool find-duplicates /tmp/report.md --threshold 0.85

# Check all issues older than 30 days
uv run gh_tool find-duplicates /tmp/report.md --state all --min-age 30
```

## Testing

The tool includes comprehensive test coverage:
- Unit tests for similarity calculation
- Integration tests for duplicate detection
- Edge case handling (transitive grouping, age filtering, threshold
sensitivity)
- Report generation validation

**Run tests:**
```bash
cd etc/scripts/gh_tool
uv run pytest -v
```

Tests are integrated into CI and run on every push.

## Documentation

- **`README.md`**: Complete usage guide with examples
- **`docs/TRIAGE-CRITERIA.md`**: Comprehensive triage guidelines
developed during manual review of 22+ issues
- **`docs/PHASE1-FINDINGS.md`**: Historical analysis context from
initial 855 issue review

## CI Integration

The tool is integrated into the GitHub Actions workflow:
- `uv` is installed via `astral-sh/setup-uv@v6`
- Tests run automatically on every push
- Ensures tool remains functional as codebase evolves

## Next Steps

Future enhancements planned for follow-up PRs:
- GitHub Action for automatic duplicate detection on new issues
- Additional automation tools (upstream health checker, label validator,
etc.)
- Automated triage reports

## Changes in this PR

-  Core duplicate detection implementation
-  Comprehensive test suite (192 lines)
-  CI integration
-  Complete documentation
-  Example triage criteria and findings

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-10-07 14:50:22 -05:00
Matt Godbolt
f493348115 Maybe resurrect coverage? 2025-04-19 23:01:06 -05:00
Patrick Quist
68d53ee163 Update test-and-deploy.yml 2025-04-08 18:31:19 +02:00
Rupert Tombs
5eeded45c4 Test the numba wrapper in test-and-deploy (#7413)
- Resolve comments from #5592:
- Replace a silly indirect import
https://github.com/compiler-explorer/compiler-explorer/pull/5592#discussion_r1962004963
- Run `test_numba_wrapper` in `.github/workflows/test-and-deploy.yml`.
https://github.com/compiler-explorer/compiler-explorer/pull/5592#discussion_r1962004131
- Patch minor errors in `etc/scripts/util/propschecktest.py` and also
test it.
2025-02-24 09:58:31 -06:00
Matt Godbolt
3aeed42066 Upgrade to node 20 minimum, target node 22 (#7343)
Co-authored-by: Mats Jun Larsen <mats@jun.codes>
2025-02-18 12:43:21 -06:00
Mats Jun Larsen
dc5f3cf43b Deduplicate npm scripts used for CI (#7356)
There's nothing special with these anymore. They are the same both
locally and in CI now, because our Vitest and Biome setups don't behave
differently there
2025-02-04 03:28:21 +09:00
Mats Jun Larsen
64397a3895 Use latest version of nodejs 18 in minimum build (#7206) 2024-12-09 20:36:24 +09:00
Partouf
15dcf0d42a add extra check 2024-09-25 14:33:26 +02:00
Patrick Quist
03ebcdd2b4 add workflow minimum support build (#6175) 2024-02-21 22:07:01 +01:00
Matt Godbolt
a1d6f9422d Fix coverage (#6157) 2024-02-18 15:41:12 -06:00
Matt Godbolt
56d0159947 Combines two renovates into one! (#6101)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-05 21:27:02 -06:00
renovate[bot]
09e9ba167f chore(deps): update actions/setup-node action to v4 (#6094)
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [actions/setup-node](https://togithub.com/actions/setup-node) | action
| major | `v3` -> `v4` |

---

### Release Notes

<details>
<summary>actions/setup-node (actions/setup-node)</summary>

### [`v4`](https://togithub.com/actions/setup-node/compare/v3...v4)

[Compare
Source](https://togithub.com/actions/setup-node/compare/v3...v4)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "before 8pm on monday" in timezone
America/Chicago, Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/compiler-explorer/compiler-explorer).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4xNzMuMCIsInVwZGF0ZWRJblZlciI6IjM3LjE3My4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-05 20:36:10 -06:00
renovate[bot]
2ee0db36e3 chore(deps): update actions/github-script action to v7 (#6092)
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [actions/github-script](https://togithub.com/actions/github-script) |
action | major | `v6` -> `v7` |

---

### Release Notes

<details>
<summary>actions/github-script (actions/github-script)</summary>

### [`v7`](https://togithub.com/actions/github-script/compare/v6...v7)

[Compare
Source](https://togithub.com/actions/github-script/compare/v6...v7)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "before 8pm on monday" in timezone
America/Chicago, Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/compiler-explorer/compiler-explorer).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4xNzMuMCIsInVwZGF0ZWRJblZlciI6IjM3LjE3My4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-05 20:33:39 -06:00
Matt Godbolt
7e139412a3 Move runners to 22.04. Partially subsumes #4950 (#5878)
See #4950
2023-12-11 20:53:32 -06:00
Matt Godbolt
e8a1f3fab2 Bump to not-about-to-be-removed version of github-script 2023-09-27 23:18:32 -05:00
Matt Godbolt
5d776aaae3 Replace ts-node-esm with direct calls to node to support node 20 (#5521)
- works both v18 and v20
- see https://github.com/TypeStrong/ts-node/issues/1997
2023-09-27 21:57:18 -05:00
Marc Auberer
fb26b2d9a1 Update checkout action to v4 (#5479)
Upgrade checkout action to v4 to make use of Node 20.
Node 16, which v3 is using, reaches end of life on 2023-09-11.
2023-09-16 17:13:45 -05:00
Matt Godbolt
c9294fccbb Attempt at using a tag script instead of a (soon to be deprecated) workflow (#5358)
Fix for...

> The following actions uses node12 which is deprecated and will be
forced to run on node16: tvdias/github-tagger@v0.0.2. For more info:
https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
2023-08-07 22:43:59 -05:00
Mohammed Keyvanzadeh
abf92f10f6 tools: update GitHub Actions workflows (#4943)
- Update the actions in the GitHub Actions workflows to their latest versions.
- Run the workflows on the latest versions of the platforms where appropriate.
- Set the `check-latest` field of the `actions/setup-node` action to `true` to use the latest release of the specified Node.js version instead of using the cached one when there's a new release available.
- Explicitly specify the action versions instead of using the `latest` tag.
2023-04-05 11:24:31 -05:00
Matt Godbolt
fb4b7bb16e Bump used node version to 18 (#4778)
Still assume node 16 compatibility for now.
2023-02-25 12:43:00 -06:00
Matt Godbolt
a4449cb012 Workflow bump v2 v3 checkout (#4140)
* Workflow bump v2 v3 checkout
* Bump labeler
2022-10-11 17:27:26 -05:00
Rubén Rincón Blanco
16b176235a JBOF: Just a Bunch of Fixes (#3957)
- Renames orphancompiler.py script to propscheck.py, the name fits better
- Fixes Go props to make them easier to maintain
- Alphabetically sorts some listings in the code
- Adds tests to the props checker script (No idea how to integrate those so it's manual for now)
- Adds 2 missing limit cases for Motd filtering
2022-08-13 01:39:41 +02:00
Mats Larsen
18160be477 Use eslint-plugin-prettier to fix and check formatting problems (#3847) 2022-07-12 22:56:03 +02:00
Mats Larsen
e24b2f72be Remove unused prettier format script (#3646) 2022-05-15 20:36:13 +01:00
Matt Godbolt
f2c1e0bd31 The Grand Reformat (#3643)
* The Grand Reformat

- everything made prettier...literally
- some tweaks to include a few more files, including documentation
- minor changes to format style
- some tiny `// prettier-ignore` changes to keep a few things the way we like them
- a couple of super minor tweaks to embedded document types to ensure they format correctly
2022-05-09 23:13:50 -05:00
Matt Godbolt
665289e515 Fix sentry (#3636)
* Unpacks the files sentry needs for source maps
2022-05-08 10:08:58 -05:00
Mats Larsen
15b57aef0e Create npm script for noEmit compiling frontend and backend to catch errors (#3580) 2022-04-27 10:05:27 +02:00
Matt Godbolt
6af73a3c2a Fix cache issue in build_dist 2022-04-26 09:26:09 -05:00
Matt Godbolt
e2bd9ceb23 Use setup-node's built-in cache (#3557) 2022-04-25 16:02:34 -05:00
Matt Godbolt
b404355391 Fix branch name in builds 2022-04-25 11:36:31 -05:00
Matt Godbolt
cf0cbacf34 Test and build distribution simultaneously (#3553)
* Test and build distribution simultaneously
2022-04-25 11:27:08 -05:00
Mats Larsen
c199b54440 Enable Prettier for TypeScript frontend (#3524) 2022-04-20 22:39:10 +02:00
Rubén Rincón Blanco
48eee26d2c Group some files to their own folders (#3384)
* Group some files to their own folders

In etc/scripts/, added disasms/, docenizers/, and util/ folders
In lib/, added mapfiles/, and parsers/ folders (+moved google.js to
shortener)
In static/, added widgets/ folder

Added cypress folder to .gitignore

* Address Matt's PR reviews

* Move new Pane renaming to folder
2022-02-22 00:18:21 +01:00
Rubén Rincón Blanco
273dd28c6e Adds compiler check to ci workflow (#3369) 2022-02-15 15:46:38 +01:00
Patrick Quist
2a2bdfd0a1 different and 2022-02-13 22:24:57 +01:00
Patrick Quist
60f266ce7c try new if 2022-02-13 22:23:58 +01:00
Patrick Quist
ccf6a4123c disable deploys on PR's 2022-02-04 18:36:28 +01:00
Matt Godbolt
a6682987dc New build and deploy setup (#3269)
* New build and deploy setup

* kills a lot of makefile complexity
* users will only ever use node-env=development for all practical
  purposes. Hopefully fixes issues where something node_modules
  is missing non-dev dependencies
* script building now pulled into a bash file
2022-01-18 20:46:33 -06:00
Matt Godbolt
7fcf892b37 More move to node 16 stuff (oops) 2022-01-17 14:18:35 -06:00
Patrick Quist
0e34de6d9b Update test-and-deploy.yml 2021-12-16 02:26:16 +01:00
Patrick Quist
de21378085 only run 1 job in workflow 2021-10-30 17:18:41 +02:00
Matt Godbolt
dc1592cdc1 Update to node v14.18.0 (#3026)
* Update to node v14.18.0
2021-10-11 23:18:19 -05:00
Matt Godbolt
1ed9ad9664 Tag builds (#2997)
Closes #2994
2021-10-04 08:26:49 -05:00
Matt Godbolt
e0a7a6283f Giving up on pull requests; nearly impossible to get the name of the branch anyway 2021-02-13 17:52:36 -06:00
Matt Godbolt
3b00ac727f Another attempt... 2021-02-13 14:46:08 -06:00
Matt Godbolt
1b5c5bbc9b Fix syntax: 2021-02-13 14:41:03 -06:00
Matt Godbolt
ff6105aa36 recombine workflows 2021-02-13 14:38:15 -06:00