Skip to content

Commit

Permalink
chore(#70): remove usage of search api from releaser workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
galargh committed Nov 28, 2024
1 parent 47570fe commit 34c04dd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
17 changes: 8 additions & 9 deletions .github/workflows/releaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,22 +95,21 @@ jobs:
env:
GITHUB_TOKEN: ${{ github.token }}
REPOSITORY: ${{ github.repository }}
QUERY: repository:${{ github.repository }} is:pr is:merged ${{ github.sha }}
REF: ${{ github.ref }}
SHA: ${{ github.sha }}
uses: actions/github-script@v7
with:
script: |
const [owner, repo] = process.env.REPOSITORY.split('/');
const items = await github.paginate(github.rest.search.issuesAndPullRequests, {
q: process.env.QUERY,
const ref = process.env.REF.replace(/^refs\/heads\//, '');
const candidates = await github.paginate(github.rest.pulls.list, {
owner,
repo,
state: 'closed',
base: ref,
});
let pr;
for (const item of items) {
const candidate = await github.rest.pulls.get({
owner,
repo,
pull_number: item.number,
});
for (const candidate of candidates) {
if (candidate.data.merge_commit_sha === process.env.SHA) {
pr = candidate;
break;
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed
- do not install the same version of Go twice in the go-test and go-check workflows
- mark the Go update commits as breaking changes in the style of conventional commits
- removed usage of search API from the releaser workflow

### Fixed
- do not mark prereleases or versions with build strings as latest in the releaser workflow
Expand Down

0 comments on commit 34c04dd

Please sign in to comment.