Skip to content

Commit

Permalink
Update auto merge workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
ffried committed Jun 21, 2022
1 parent c540ab5 commit 880415c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/enable-auto-merge.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
name: Auto-merge for Dependabot PRs

on: pull_request_target
on: pull_request

permissions:
pull-requests: write
contents: write

jobs:
enable-auto-merge:
if: ${{ github.actor == 'dependabot[bot]' }}
name: Enable auto-merge for Dependabot PRs
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' }}
steps:
- name: Enable auto-merge
run: gh pr merge --auto --rebase "$PR_URL"
Expand Down
4 changes: 2 additions & 2 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ async function main() {
}

core.startGroup('Validate version');
const versionRegEx = new RegExp(`^${prefixRegex}[0-9]+\\.[0-9]+\\.[0-9]+${suffixRegex}$`);
const versionRegEx = new RegExp(`^${prefixRegex}\d+\\.\d+\\.\d+${suffixRegex}$`);
if (!versionRegEx.test(tag)) {
const message = `Version tag ${tag} does not match (semver) regex ${versionRegEx.source}`;
if (failOnNonSemVerTag) {
Expand Down Expand Up @@ -246,7 +246,7 @@ async function main() {
throw new Error(`Could not find an existing GitHub release for tag ${tag}`);
}

// To mark the full release as latest, we simply update it by appending `&nbsp`.
// To mark the full release as latest, we simply update it by appending `&nbsp` and removing it again.
const appendUpdate = {
owner: github.context.repo.owner,
repo: github.context.repo.repo,
Expand Down

0 comments on commit 880415c

Please sign in to comment.