Skip to content

Commit

Permalink
Prefer PR number for group instead of ref (#1147)
Browse files Browse the repository at this point in the history
<!-- By submitting a PR to this repository, you agree to the terms
within the [Auth0 Code of
Conduct](https://github.com/auth0/open-source-template/blob/master/CODE-OF-CONDUCT.md).
Please see the [contributing
guidelines](https://github.com/auth0/.github/blob/master/CONTRIBUTING.md)
for how to create and submit a high-quality PR for this repo. -->

### Changes

There are a few PRs that are stuck waiting for Browerstack tests to run,
when checking [that
action](https://github.com/auth0/auth0-spa-js/actions/runs/6250742960)
we can see the following `Browserstack: .github#L1
Canceling since a higher priority waiting request for
'Browserstack-refs/heads/main' exists`, and this group key is consistent
across all 3 PRs.

I believe this is because we use `pull_request_target` where the ref is
the base branch (branch the PR is targeting), by preferring the PR
number where possible we ensure it's unique for PRs.

Usual caveat applies of not being able to thoroughly test until merged,
but based on other repos across GitHub I think usage of nested objects
that may not exist is safe.

### References

<!--
Please include relevant links supporting this change such as a:

- support ticket
- community post
- StackOverflow post
- support forum thread

Please note any links that are not publicly accessible.
-->

### Testing

<!--
Please describe how this can be tested by reviewers. Be specific about
anything not tested and reasons why. If this library has unit and/or
integration testing, tests should be added for new functionality and
existing tests should complete without errors.
-->

- [ ] This change adds unit test coverage
- [ ] This change adds integration test coverage
- [ ] This change has been tested on the latest version of the
platform/language

### Checklist

- [x] I have read the [Auth0 general contribution
guidelines](https://github.com/auth0/open-source-template/blob/master/GENERAL-CONTRIBUTING.md)
- [x] I have read the [Auth0 Code of
Conduct](https://github.com/auth0/open-source-template/blob/master/CODE-OF-CONDUCT.md)
- [x] All code quality tools/guidelines have been run/followed
  • Loading branch information
ewanharris authored Sep 20, 2023
1 parent ddd4d5d commit cedbd50
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/browserstack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

env:
Expand Down

0 comments on commit cedbd50

Please sign in to comment.