Skip to content

Commit 54d90a9

Browse files
committed
chore/ci: Add DiffTour link to PRs
Adding the shared sourcegraph/actions/diff-tour action to comment on PRs with the Diff Tour link. Please make any needed improvements to the shared action, so all of our repos using it benefit.
1 parent 8a793e3 commit 54d90a9

1 file changed

Lines changed: 27 additions & 0 deletions

File tree

‎.github/workflows/diff-tour.yml‎

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# This GitHub Action imported from the shared action
2+
# https://github.com/sourcegraph/actions/blob/main/diff-tour/
3+
# Please make fixes / enhancements in the shared action,
4+
# so all of our repos get the benefits
5+
6+
name: Diff Tour link
7+
8+
on:
9+
pull_request:
10+
# `edited` fires when the base branch changes; `synchronize` does not
11+
# `closed` fires on merge and on plain close; either way the comment is
12+
# updated to a link that survives deleting the head branch
13+
types: [closed, edited, opened, reopened, synchronize]
14+
15+
# The only permission needed. The action does not check out your repo, so
16+
# `contents: read` is not required, even for private repos
17+
permissions:
18+
pull-requests: write
19+
20+
jobs:
21+
diff-tour:
22+
name: Comment
23+
runs-on: ubuntu-latest
24+
# Diff Tour resolves branch names against the base repo, so skip fork PRs
25+
if: github.event.pull_request.head.repo.full_name == github.repository
26+
steps:
27+
- uses: sourcegraph/actions/diff-tour@main

0 commit comments

Comments
 (0)