Repository navigation
created new action that creates a GitHub issue for dependency updates #109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
c8d4512
created new action to create a GitHub for dependency updates
ramaghanta 2fe1108
created new action that will create a GitHub issue for dependency upd…
ramaghanta 59e3c61
updated cron expression in readme
ramaghanta 8512398
updated example in readme
ramaghanta f32f7a9
updated readme
ramaghanta e8e7332
create issue label if it doesn't exist
ramaghanta File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,60 @@ | ||
| # Check Dependencies | ||
|
|
||
| Creates an **Update dependencies** issue when the latest matching issue closed as | ||
| completed is at least `max-age-days` old. If no completed issue exists, maintenance | ||
| is due immediately. An open matching issue suppresses creation. Pull requests and | ||
| issues closed as not planned do not reset the interval. | ||
|
|
||
| Each run creates the repository's `DEPENDENCY UPDATE` label if it is missing, | ||
| even when no new issue is due. Existing label settings are preserved. No | ||
| organization default label configuration is required. | ||
|
|
||
| New issues receive the `DEPENDENCY UPDATE` label. Matching recognizes that label | ||
| (case insensitive), the hidden `<!-- check-dependencies -->` marker, or historical | ||
| maintenance titles. Historical titles include `update dependencies` with optional | ||
| suffixes (such as `and workflows` or `and setup OIDC publishing`), | ||
| `Update to latest dependencies`, and `dependency / CI updates yyyy-mm-dd`. | ||
| Title matching ignores case and surrounding whitespace. Labeled issues can have | ||
| any title. Historical issues do not need to be relabeled to count toward the | ||
| maintenance interval or suppress a duplicate. | ||
|
|
||
| Recent human commit authors on the default branch are ranked by commit count, | ||
| then latest authorship date, then username. Bots and commits without a linked | ||
| GitHub user are excluded. The action tries each author's assignment eligibility | ||
| in order, then `fallback-assignee`. If nobody is eligible, it creates an | ||
| unassigned issue and logs a warning. API errors other than an ineligible | ||
| assignee's 404 fail the action. | ||
|
|
||
| ```yaml | ||
| name: Check Dependencies | ||
| on: | ||
| schedule: | ||
| - cron: '0 10 * * 1-5' | ||
| workflow_dispatch: {} | ||
|
|
||
| permissions: | ||
| contents: read | ||
| issues: write | ||
|
|
||
| # Serialize checks to prevent overlapping runs from opening duplicate issues. | ||
| concurrency: | ||
| group: check-dependencies | ||
| cancel-in-progress: false | ||
|
|
||
| jobs: | ||
| check: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: checkdigit/github-actions/check-dependencies@main | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| with: | ||
| max-age-days: '90' | ||
| contributor-lookback-days: '90' | ||
| fallback-assignee: '' | ||
| ``` | ||
|
|
||
| Both day inputs must be positive integers. `GITHUB_REPOSITORY` is supplied by | ||
| GitHub Actions. The `issue-url` output contains the created issue URL, or an empty | ||
| string when creation is skipped. Close maintenance issues as **completed** once | ||
| the dependency updates are merged. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| name: Check Dependencies | ||
| description: Check dependencies and create one overdue maintenance issue with recent-contributor ownership | ||
| inputs: | ||
| max-age-days: | ||
| description: Days since the latest dependency-update issue closed as completed | ||
| default: '90' | ||
| contributor-lookback-days: | ||
| description: Days of default-branch commit authorship to rank | ||
| default: '90' | ||
| fallback-assignee: | ||
| description: GitHub username to try after eligible recent contributors | ||
| default: '' | ||
| outputs: | ||
| issue-url: | ||
| description: GitHub URL of created issue | ||
| runs: | ||
| using: node24 | ||
| pre: '../src/setup.ts' | ||
| main: ../src/check-dependencies/index.ts | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.