Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/updater.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@b173b6ec0100793626c2d9e6b90435061f4fc3e5 # Tag: 0.11.0
uses: styfle/cancel-workflow-action@01ce38bf961b4e243a6342cbade0dbc8ba3f0432 # Tag: 0.12.0
with:
access_token: ${{ github.token }}

Expand Down Expand Up @@ -147,7 +147,7 @@ jobs:

- name: Fetch an existing PR
if: ${{ ( steps.target.outputs.latestTag != steps.target.outputs.originalTag ) && ( steps.root.outputs.changed == 'false') }}
uses: octokit/request-action@89a1754fe82ca777b044ca8e79e9881a42f15a93 # v2.1.7
uses: octokit/request-action@89697eb6635e52c6e1e5559f15b5c91ba5100cb0 # v2.1.9
id: existing-pr-request
with:
route: GET /repos/${{ github.repository }}/pulls?base={base}&head={head}
Expand Down Expand Up @@ -195,7 +195,7 @@ jobs:
# First we create a PR only if it doesn't exist. We will later overwrite the content with the same action.
- name: Create a PR
if: ${{ ( steps.target.outputs.latestTag != steps.target.outputs.originalTag ) && ( steps.existing-pr.outputs.url == '') && ( steps.root.outputs.changed == 'false') }}
uses: peter-evans/create-pull-request@b4d51739f96fca8047ad065eccef63442d8e99f7 # pin#v4
uses: peter-evans/create-pull-request@153407881ec5c347639a548ade7d8ad1d6740e38 # pin#v5.0.2
id: create-pr
with:
base: ${{ steps.root.outputs.baseBranch }}
Expand Down Expand Up @@ -258,7 +258,7 @@ jobs:
# Now make the PR in its final state. This way we only have one commit and no updates if there are no changes between runs.
- name: Update the PR
if: ${{ ( steps.target.outputs.latestTag != steps.target.outputs.originalTag ) && ( steps.root.outputs.changed == 'false') }}
uses: peter-evans/create-pull-request@b4d51739f96fca8047ad065eccef63442d8e99f7
uses: peter-evans/create-pull-request@153407881ec5c347639a548ade7d8ad1d6740e38 # pin#v5.0.2
with:
base: ${{ steps.root.outputs.baseBranch }}
branch: ${{ steps.root.outputs.prBranch }}
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@

- Sentry-CLI integration test action: support envelopes ([#58](https://github.com/getsentry/github-workflows/pull/58))

### Dependencies

- Bump updater action dependencies ([#61](https://github.com/getsentry/github-workflows/pull/61))

## 2.7.0

### Features
Expand Down
14 changes: 7 additions & 7 deletions updater/tests/nonbot-commits.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Set-StrictMode -Version latest
function NonBotCommits([Parameter(Mandatory = $true)][string] $branch)
{
$result = & "$PSScriptRoot/../scripts/nonbot-commits.ps1" `
-RepoUrl 'https://github.com/getsentry/github-workflows' -MainBranch "main" -PrBranch $branch
-RepoUrl 'https://github.com/getsentry/github-workflows' -MainBranch 'main' -PrBranch $branch
if (-not $?)
{
throw $result
Expand All @@ -17,17 +17,17 @@ function NonBotCommits([Parameter(Mandatory = $true)][string] $branch)
$result
}

RunTest "empty-if-all-commits-by-bot" {
RunTest 'empty-if-all-commits-by-bot' {
$commits = NonBotCommits 'deps/updater/tests/sentry-cli.properties'
AssertEqual "$commits" ""
AssertEqual '' "$commits"
}

RunTest "empty-if-branch-doesnt-exist" {
RunTest 'empty-if-branch-doesnt-exist' {
$commits = NonBotCommits 'non-existent-branch'
AssertEqual "$commits" ""
AssertEqual '' "$commits"
}

RunTest "non-empty-if-changed" {
RunTest 'non-empty-if-changed' {
$commits = NonBotCommits 'test/nonbot-commits'
AssertEqual "$commits" "6133a25 Update README.md"
AssertEqual '0b7d9cc test: keep this branch' "$commits"
}