Skip to content

Commit

Permalink
💚 Fix pull request labels workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Samuel Guillemet committed Dec 6, 2023
1 parent b4d1f3d commit d2c3233
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions .github/workflows/pull-request-labels.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,19 @@ jobs:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const labels = ["release:patch", "release:minor", "release:major"];
const last_release = await github.repos.getLatestRelease({
owner: context.repo.owner,
repo: context.repo.repo,
});
let last_release = {
data: {
tag_name: "v0.0.0",
},
}
try {
last_release = await github.repos.getLatestRelease({
owner: context.repo.owner,
repo: context.repo.repo,
});
} catch (error) {
console.log("No release found");
}
const last_release_tag = last_release.data.tag_name;
const last_release_version = last_release_tag.replace("v", "");
if (last_release_version === process.env.VERSION) {
Expand Down

0 comments on commit d2c3233

Please sign in to comment.