Skip to content

Commit bec452f

Browse files
authored
Merge pull request rust-lang#19078 from lnicola/no-ci-forks
minor: Stop running some release workflows on forks and update old URLs
2 parents da96fff + e70b589 commit bec452f

File tree

6 files changed

+17
-12
lines changed

6 files changed

+17
-12
lines changed

src/tools/rust-analyzer/.github/workflows/autopublish.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ on:
1111

1212
jobs:
1313
publish:
14+
if: ${{ github.repository == 'rust-lang/rust-analyzer' || github.event.action == 'workflow_dispatch' }}
1415
name: publish
1516
runs-on: ubuntu-latest
1617
steps:

src/tools/rust-analyzer/.github/workflows/publish-libs.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ on:
99

1010
jobs:
1111
publish-libs:
12+
if: ${{ github.repository == 'rust-lang/rust-analyzer' || github.event.action == 'workflow_dispatch' }}
1213
name: publish
1314
runs-on: ubuntu-latest
1415
steps:

src/tools/rust-analyzer/.github/workflows/release.yaml

+7-4
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ env:
2222

2323
jobs:
2424
dist:
25+
if: ${{ github.repository == 'rust-lang/rust-analyzer' || github.event.action == 'workflow_dispatch' }}
2526
strategy:
2627
matrix:
2728
include:
@@ -138,6 +139,7 @@ jobs:
138139
path: ./dist
139140

140141
dist-x86_64-unknown-linux-musl:
142+
if: ${{ github.repository == 'rust-lang/rust-analyzer' || github.event.action == 'workflow_dispatch' }}
141143
name: dist (x86_64-unknown-linux-musl)
142144
runs-on: ubuntu-latest
143145
env:
@@ -183,6 +185,7 @@ jobs:
183185
path: ./dist
184186

185187
publish:
188+
if: ${{ github.repository == 'rust-lang/rust-analyzer' || github.event.action == 'workflow_dispatch' }}
186189
name: publish
187190
runs-on: ubuntu-latest
188191
needs: ["dist", "dist-x86_64-unknown-linux-musl"]
@@ -257,24 +260,24 @@ jobs:
257260
working-directory: ./editors/code
258261

259262
- name: Publish Extension (Code Marketplace, release)
260-
if: github.ref == 'refs/heads/release' && (github.repository == 'rust-analyzer/rust-analyzer' || github.repository == 'rust-lang/rust-analyzer')
263+
if: github.ref == 'refs/heads/release' && github.repository == 'rust-lang/rust-analyzer'
261264
working-directory: ./editors/code
262265
# token from https://dev.azure.com/rust-analyzer/
263266
run: npx vsce publish --pat ${{ secrets.MARKETPLACE_TOKEN }} --packagePath ../../dist/rust-analyzer-*.vsix
264267

265268
- name: Publish Extension (OpenVSX, release)
266-
if: github.ref == 'refs/heads/release' && (github.repository == 'rust-analyzer/rust-analyzer' || github.repository == 'rust-lang/rust-analyzer')
269+
if: github.ref == 'refs/heads/release' && github.repository == 'rust-lang/rust-analyzer'
267270
working-directory: ./editors/code
268271
run: npx ovsx publish --pat ${{ secrets.OPENVSX_TOKEN }} --packagePath ../../dist/rust-analyzer-*.vsix
269272
timeout-minutes: 2
270273

271274
- name: Publish Extension (Code Marketplace, nightly)
272-
if: github.ref != 'refs/heads/release' && (github.repository == 'rust-analyzer/rust-analyzer' || github.repository == 'rust-lang/rust-analyzer')
275+
if: github.ref != 'refs/heads/release' && github.repository == 'rust-lang/rust-analyzer'
273276
working-directory: ./editors/code
274277
run: npx vsce publish --pat ${{ secrets.MARKETPLACE_TOKEN }} --packagePath ../../dist/rust-analyzer-*.vsix --pre-release
275278

276279
- name: Publish Extension (OpenVSX, nightly)
277-
if: github.ref != 'refs/heads/release' && (github.repository == 'rust-analyzer/rust-analyzer' || github.repository == 'rust-lang/rust-analyzer')
280+
if: github.ref != 'refs/heads/release' && github.repository == 'rust-lang/rust-analyzer'
278281
working-directory: ./editors/code
279282
run: npx ovsx publish --pat ${{ secrets.OPENVSX_TOKEN }} --packagePath ../../dist/rust-analyzer-*.vsix
280283
timeout-minutes: 2

src/tools/rust-analyzer/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<p align="center">
22
<img
3-
src="https://raw.githubusercontent.com/rust-analyzer/rust-analyzer/master/assets/logo-wide.svg"
3+
src="https://raw.githubusercontent.com/rust-lang/rust-analyzer/master/assets/logo-wide.svg"
44
alt="rust-analyzer logo">
55
</p>
66

src/tools/rust-analyzer/xtask/src/publish/notes.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -549,18 +549,18 @@ impl Macro {
549549
}
550550
"pr" => {
551551
let pr = &self.target;
552-
let url = format!("https://github.com/rust-analyzer/rust-analyzer/pull/{pr}");
552+
let url = format!("https://github.com/rust-lang/rust-analyzer/pull/{pr}");
553553
format!("[`#{pr}`]({url})")
554554
}
555555
"commit" => {
556556
let hash = &self.target;
557557
let short = &hash[0..7];
558-
let url = format!("https://github.com/rust-analyzer/rust-analyzer/commit/{hash}");
558+
let url = format!("https://github.com/rust-lang/rust-analyzer/commit/{hash}");
559559
format!("[`{short}`]({url})")
560560
}
561561
"release" => {
562562
let date = &self.target;
563-
let url = format!("https://github.com/rust-analyzer/rust-analyzer/releases/{date}");
563+
let url = format!("https://github.com/rust-lang/rust-analyzer/releases/{date}");
564564
format!("[`{date}`]({url})")
565565
}
566566
_ => bail!("macro not supported: {name}"),

src/tools/rust-analyzer/xtask/test_data/expected.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22

33
Hello!
44

5-
Commit: [`0123456`](https://github.com/rust-analyzer/rust-analyzer/commit/0123456789abcdef0123456789abcdef01234567) \
6-
Release: [`2022-01-01`](https://github.com/rust-analyzer/rust-analyzer/releases/2022-01-01)
5+
Commit: [`0123456`](https://github.com/rust-lang/rust-analyzer/commit/0123456789abcdef0123456789abcdef01234567) \
6+
Release: [`2022-01-01`](https://github.com/rust-lang/rust-analyzer/releases/2022-01-01)
77

88
## New Features
99

10-
- **BREAKING** [`#1111`](https://github.com/rust-analyzer/rust-analyzer/pull/1111) shortcut <kbd>ctrl</kbd>+<kbd>r</kbd>
10+
- **BREAKING** [`#1111`](https://github.com/rust-lang/rust-analyzer/pull/1111) shortcut <kbd>ctrl</kbd>+<kbd>r</kbd>
1111
- hyphen-prefixed list item
1212
- nested list item
1313
- `foo` -> `foofoo`
@@ -65,7 +65,7 @@ Release: [`2022-01-01`](https://github.com/rust-analyzer/rust-analyzer/releases/
6565
- list item with an inline image
6666
![](https://example.com/animation.gif)
6767

68-
The highlight of the month is probably [`#1111`](https://github.com/rust-analyzer/rust-analyzer/pull/1111).
68+
The highlight of the month is probably [`#1111`](https://github.com/rust-lang/rust-analyzer/pull/1111).
6969
See [online manual](https://example.com/manual) for more information.
7070

7171
```bash

0 commit comments

Comments
 (0)