Commit Graph

466 Commits

Author SHA1 Message Date
George Joseph 1b80269ed4 Retrieve Issues and PRs using a search filter
_Context:_
Normally, all open issues/PRs in the repository that's running this
action are retrieved then all the label, assignee, milestone, etc. criteria
you provide to the action are applied. Unfortunately, this limits the action
to only those issues and PRs in this repository.  It also prevents operating
on only a subset of issues or PRs that can't be filtered by the existing
action criteria.  A good example of this are PRs that are in a
`review:changes_requested` state.  While additional filtering criteria could
be added to the action, it would result in additional callbacks to GitHub
which could trigger rate-limits to be applied.

_Purpose:_
This option is an array of one or more standard [GitHub Issues and
Pull Requests search queries]
(https://docs.github.com/en/search-github/searching-on-github/searching-issues-and-pull-requests)
which will be used to retrieve the set of issues/PRs to test and take action
on. These queries will be used in place of the default retrieval of all open
issues and PRs for the context's owner/repo.  It can be used to expand or
limit the set of issues and PRs operated on beyond what is retuned by the
standard query.  When the retrieval is complete, all the other label,
assignee, milestone, etc. criteria will be applied.

You may also use this option to improve performance when you have a large number
of open issues or PRs but only a small subset might be eligible for action. For
instance, let's say you have 1000 open issues in your repository but only those
with label `auto-closable` should ever be automatically marked as stale or
closed.  By default, this action would retrieve all 1000 issues _and all open
PRs_ and iterate over them looking for the label you specified in the
`only-issues-label` parameter. If you use the `only-matching-filter` parameter
with `repo:myorg/myrepo is:issue label:auto-closable` this would limit the
download to just those issues you  _know_ should  have further criteria
applied.

_Syntax:_

```
only-matching-filter: [ "<query_string>", ... ]
```

Or if there's only one query string...

```
only-matching-filter: '<query_string>'
```

_Examples:_
To operate only on the open PRs in your organization that have a review state of
`changes_requested`:

```
only-matching-filter: 'org:myorg is:pr is:open review:changes_requested'
```

Since there's only one query specified, you can omit the array syntax and just
specify the string directly.

GitHub only allows boolean logic and grouping in a Code Searches not in Issues
and Pull Requests searches so there's no way to do an "OR" operation but you
can get around this to a limited degree by specifying multiple search queries
in the form of a string array. Each query is run separately and the results are
accumulated and duplicates removed before any further processing is done.

To retrieve all of the open PRs in your organization that have a review state of
`changes_requested` or a label named `submitter-action-required`, you'd use:

```
only-matching-filter: '[ "org:myorg is:pr is:open review:changes_requested", "org:myorg is:pr is:open label:submitter-action-required" ]'
```

_Notes:_
* Each query is checked to ensure it contains an `owner:`, `org:`, `user:` or
`repo:` search term.  If it doesn't, the search will automatically be scoped
to the owner and repository in the context to prevent accidental global
searches.  If the request doesn't already contain an `is:open` search term,
it will automatically be added as well.
* If using the array form, the value of this parameter MUST be valid JSON
which means using double quotes around each query string, not single quotes.

Default value: '[]'

Resolves: #1143
2024-03-20 12:20:00 -06:00
マルコメ 3f3b0175e8
Update README.md (#1116)
Licensed / Licensed (push) Failing after 0s Details
Update configuration files / Update configuration files (push) Failing after 0s Details
Code scanning / CodeQL analysis (push) Failing after 0s Details
2023-12-14 15:52:37 +01:00
aparnajyothi-y 28ca103628
Upgrade Node to v20 (#1110)
Basic validation / Basic validation (push) Failing after 0s Details
Check dist/ / Check dist/ (push) Failing after 0s Details
Code scanning / CodeQL analysis (push) Failing after 0s Details
e2e tests / dry-run-test (push) Successful in 10s Details
Licensed / Licensed (push) Failing after 0s Details
* Upgrade to v20

* Fix for failed checks

* Fix for failed checks

* 8.0.0

* Packages degraded to older version

* licensed update

* format-check

* Updated the logic

* Format-check

* 9.0.0
2023-12-07 17:48:34 +05:30
dependabot[bot] b69b346013
build(deps-dev): bump @types/node from 18.16.18 to 20.5.1 (#1079)
* build(deps-dev): bump @types/node from 18.16.18 to 20.5.1

Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 18.16.18 to 20.5.1.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* Fix @types/node.dep.yml, license

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Sergey Dolin <dsame@github.com>
2023-09-01 09:01:45 +02:00
dependabot[bot] 88a6f4f6cb
build(deps-dev): bump typescript from 5.1.3 to 5.2.2 (#1083)
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 5.1.3 to 5.2.2.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v5.1.3...v5.2.2)

---
updated-dependencies:
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-01 09:01:29 +02:00
Marko Zivic 796531a7b3
Merge pull request #1080 from akv-platform/fix-delete-cache
Fix delete cache
2023-08-24 09:21:05 +02:00
Sergey Dolin 8986f6218b Don not try to delete cache if it does not exists 2023-08-22 11:20:20 +02:00
Sergey Dolin cab99b362b fix typo proceeded/processed 2023-08-11 00:31:51 +02:00
Sergey Dolin 184e7afe93
Merge pull request #1064 from actions/dependabot/npm_and_yarn/typescript-eslint/eslint-plugin-6.2.1
build(deps-dev): bump @typescript-eslint/eslint-plugin from 5.60.0 to 6.2.1
2023-08-04 12:17:06 +02:00
Ivan Zosimov 523885cf3c chore: update eslint-plugin, parser and eslint-plugin-jest 2023-08-04 11:38:38 +02:00
dependabot[bot] 2487a1dc2b
build(deps-dev): bump @typescript-eslint/eslint-plugin
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 5.60.0 to 6.2.1.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v6.2.1/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-02 23:00:09 +00:00
Sergey Dolin 60c722ee97
Merge pull request #1063 from actions/dependabot/npm_and_yarn/jest-29.6.2
build(deps-dev): bump jest from 29.6.1 to 29.6.2
2023-08-02 23:39:12 +02:00
dependabot[bot] f766dacc16
build(deps-dev): bump jest from 29.6.1 to 29.6.2
Bumps [jest](https://github.com/facebook/jest/tree/HEAD/packages/jest) from 29.6.1 to 29.6.2.
- [Release notes](https://github.com/facebook/jest/releases)
- [Changelog](https://github.com/jestjs/jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/facebook/jest/commits/v29.6.2/packages/jest)

---
updated-dependencies:
- dependency-name: jest
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-02 21:34:02 +00:00
Sergey Dolin 5ca2c2b512
Merge pull request #1050 from actions/dependabot/npm_and_yarn/tough-cookie-and-azure/ms-rest-js--removed
build(deps): bump tough-cookie and @azure/ms-rest-js
2023-08-02 23:30:43 +02:00
Sergey Dolin fcc38c89b2
Merge pull request #1056 from dusan-trickovic/fix/update-semver
Update Semver to 7.5.4 and add licensing
2023-08-02 23:30:29 +02:00
Sergey Dolin c850f73ba8
Merge pull request #1060 from actions/dependabot/npm_and_yarn/jest-and-types/jest-29.6.1
build(deps-dev): bump jest and @types/jest
2023-08-02 23:30:17 +02:00
Sergey Dolin d4393a716e
Merge pull request #1061 from actions/dependabot/npm_and_yarn/typescript-eslint/parser-5.62.0
build(deps-dev): bump @typescript-eslint/parser from 5.60.0 to 5.62.0
2023-08-02 23:30:09 +02:00
Sergey Dolin e3c5558f1f
Merge pull request #1062 from actions/dependabot/npm_and_yarn/eslint-8.46.0
build(deps-dev): bump eslint from 8.43.0 to 8.46.0
2023-08-02 23:30:00 +02:00
dependabot[bot] ba33ad2dac
build(deps-dev): bump eslint from 8.43.0 to 8.46.0
Bumps [eslint](https://github.com/eslint/eslint) from 8.43.0 to 8.46.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.43.0...v8.46.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-31 11:47:40 +00:00
Sergey Dolin 60f51589e2
Merge pull request #1057 from akv-platform/cache-miss
Do not restore state if the cache does not exist
2023-07-27 10:21:37 +02:00
Sergey Dolin dbb041abe2 Fix spelling 2023-07-27 07:16:19 +02:00
dependabot[bot] 331c73cfa6
build(deps-dev): bump @typescript-eslint/parser from 5.60.0 to 5.62.0
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 5.60.0 to 5.62.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.62.0/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-24 11:54:43 +00:00
dependabot[bot] 87e2adf864
build(deps-dev): bump jest and @types/jest
Bumps [jest](https://github.com/facebook/jest/tree/HEAD/packages/jest) and [@types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jest). These dependencies needed to be updated together.

Updates `jest` from 29.5.0 to 29.6.1
- [Release notes](https://github.com/facebook/jest/releases)
- [Changelog](https://github.com/jestjs/jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/facebook/jest/commits/v29.6.1/packages/jest)

Updates `@types/jest` from 29.5.2 to 29.5.3
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jest)

---
updated-dependencies:
- dependency-name: jest
  dependency-type: direct:development
  update-type: version-update:semver-minor
- dependency-name: "@types/jest"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-24 11:54:03 +00:00
Sergey Dolin 19b0faf982 do not restore if caches does not exist 2023-07-21 13:21:36 +02:00
Dusan Trickovic 7d39c14e50 Fix licensing for @azure/ms-rest-js 2023-07-20 13:05:24 +02:00
Dusan Trickovic 13074eec5e Update @types/semver dependency to latest 2023-07-20 01:27:15 +02:00
Dusan Trickovic 2eb6fe7447 Update Semver to 7.5.4 and add licensing 2023-07-20 01:08:42 +02:00
Sergey Dolin 47ab9e7777
Merge pull request #1032 from akv-platform/ratelimit
Log github api rate info
2023-07-14 09:57:07 +02:00
Sergey Dolin 4b8e745923 Add RateLimit 2023-07-11 09:36:52 +02:00
dependabot[bot] cc8e550d9c
build(deps): bump tough-cookie and @azure/ms-rest-js
Removes [tough-cookie](https://github.com/salesforce/tough-cookie). It's no longer used after updating ancestor dependency [@azure/ms-rest-js](https://github.com/Azure/ms-rest-js). These dependencies need to be updated together.


Removes `tough-cookie`

Updates `@azure/ms-rest-js` from 2.6.6 to 2.7.0
- [Changelog](https://github.com/Azure/ms-rest-js/blob/master/Changelog.md)
- [Commits](https://github.com/Azure/ms-rest-js/commits)

---
updated-dependencies:
- dependency-name: tough-cookie
  dependency-type: indirect
- dependency-name: "@azure/ms-rest-js"
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-09 10:13:06 +00:00
Sergey Dolin 465330b7e2
Merge pull request #1033 from akv-platform/apirate
Turn the action into stateful
2023-07-06 08:00:12 +02:00
Sergey Dolin a5472823b9 fix dependencies 2023-07-05 17:16:02 +02:00
Sergey Dolin 6ed4ef197b fix README 2023-07-05 17:02:27 +02:00
Sergey Dolin 8f54fa9cb2 remove internal API client 2023-07-05 16:46:04 +02:00
Sergey Dolin ef7b227095 use highlevel actions cache api for restore 2023-07-05 16:42:40 +02:00
Sergey Dolin caeb593a24 use highlevel actions cache api for save 2023-07-05 16:38:08 +02:00
Sergey Dolin d8dfea6c6d use highlevel actions cache api with key-prefix 2023-07-05 10:43:19 +02:00
Sergey Dolin 19f709fe58 use highlevel actions cache api 2023-07-05 10:37:35 +02:00
Sergey Dolin 56c9f4224b Rename createHttpClient to createActionsCacheClient 2023-07-05 09:53:06 +02:00
Sergey Dolin a9c16cbf4d Rename ActionCache to ActionsCache 2023-07-04 18:29:58 +02:00
Sergey Dolin 765f3db869 Add integration tests 2023-07-03 20:25:25 +02:00
Sergey Dolin 57aa6deac4 Add integration tests 2023-07-03 15:07:52 +02:00
Sergey Dolin e8f3c1bb43 Add integration tests 2023-07-02 22:40:55 +02:00
Sergey Dolin fa4dca37f7 Add unit tests 2023-07-02 11:01:29 +02:00
Sergey Dolin ab422d01a2 Use cache instead of artifacts 2023-06-30 10:15:37 +02:00
Sergey Dolin c7d43763bf Use cache instead of artifacts 2023-06-23 21:29:53 +02:00
Sergey Dolin 6e0ace4210 Add logging 2023-06-23 09:23:17 +02:00
Sergey Dolin e953c7f258 Add logging 2023-06-23 09:21:22 +02:00
Sergey Dolin 1e059ce975 Do not mutate state in debug mode 2023-06-23 09:12:13 +02:00
Sergey Dolin 7109b30ab8 Fix license 2023-06-22 15:04:18 +02:00