{"id":13820537,"url":"https://github.com/Makeshift/generate-dependabot-glob-action","last_synced_at":"2025-05-16T10:31:28.158Z","repository":{"id":63560198,"uuid":"568425519","full_name":"Makeshift/generate-dependabot-glob-action","owner":"Makeshift","description":"Generates a `dependabot.yml` and PRs it against your repo if it needs updating to include a new directory or package-ecosystem, with globs/wildcards","archived":false,"fork":false,"pushed_at":"2024-05-03T18:34:05.000Z","size":456,"stargazers_count":17,"open_issues_count":13,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-05T20:05:52.553Z","etag":null,"topics":["dependabot","dependency-management","github-actions"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Makeshift.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-11-20T13:54:23.000Z","updated_at":"2024-05-06T02:59:06.000Z","dependencies_parsed_at":"2024-05-28T13:51:08.998Z","dependency_job_id":null,"html_url":"https://github.com/Makeshift/generate-dependabot-glob-action","commit_stats":{"total_commits":22,"total_committers":4,"mean_commits":5.5,"dds":"0.40909090909090906","last_synced_commit":"0fca97fb04e45b802820625fd609f8940ad9ca46"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Makeshift%2Fgenerate-dependabot-glob-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Makeshift%2Fgenerate-dependabot-glob-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Makeshift%2Fgenerate-dependabot-glob-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Makeshift%2Fgenerate-dependabot-glob-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Makeshift","download_url":"https://codeload.github.com/Makeshift/generate-dependabot-glob-action/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225423638,"owners_count":17472152,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dependabot","dependency-management","github-actions"],"created_at":"2024-08-04T08:01:05.000Z","updated_at":"2024-11-19T20:30:43.351Z","avatar_url":"https://github.com/Makeshift.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# Generate Dependabot Glob Action\n\nThis action creates a `dependabot.yml` file from a user-provided template by replacing instances of directory globs with an array of objects matching that glob, with all the other keys copied.\n\nFor example, the following template:\n\n```yaml\n  - package-ecosystem: 'docker'\n    directory: '/test/docker/*/Dockerfile*'\n    schedule:\n      interval: 'daily'\n```\n\nWill result in:\n\n```yaml\n  - package-ecosystem: 'docker'\n    directory: '/test/docker/container_1/'\n    schedule:\n      interval: 'daily'\n  - package-ecosystem: 'docker'\n    directory: '/test/docker/container_2/'\n    schedule:\n      interval: 'daily'\n  - package-ecosystem: 'docker'\n    directory: '/test/docker/weird_dockerfile/'\n    schedule:\n      interval: 'daily'\n```\n\nNote that the basename of any matching directory is used as the value.\n\nThis action uses the [glob](https://www.npmjs.com/package/glob) node module. Refer to its documentation for more information on the glob syntax.\n\nThe default configuration for `glob` is as follows:\n\n```js\nconst globOpts = {\n  root: process.cwd(),\n  mark: true,\n  matchBase: true,\n  nomount: true,\n  follow: core.getInput('follow-symbolic-links') === 'true'\n}\n```\n\nIf these options are not sufficient, please open an issue and let me know.\n\n## Quickstart\n\n### Create a `.github/dependabot.template.yml` file\n\nThis is just a normal `dependabot.yml` file, but with globs/wildcards in the `directory` field.\nNote that comments will not be transferred to the generated file.\n\n  ```yaml\nversion: 2\n\nupdates:\n  - package-ecosystem: 'github-actions'\n    # No globs\n    directory: '/'\n    schedule:\n      interval: 'daily'\n\n  - package-ecosystem: 'docker'\n    # Simple globs\n    directory: '/test/docker/*/Dockerfile*'\n    schedule:\n      interval: 'weekly'\n\n  - package-ecosystem: 'npm'\n    # Simple glob + extglob\n    directory: '/test/npm/*/{package-lock.json,yarn.lock}'\n    ignore:\n      - dependency-name: '*'\n    schedule:\n      interval: 'daily'\n\n  - package-ecosystem: 'terraform'\n    # Searches the entire tree, but only matches files with the given name\n    # This actually outputs without a leading slash, but dependabot doesn't seem to care\n    # Note the . is escaped, node-glob doesn't search hidden files by default\n    directory: '\\.terraform.lock.hcl'\n    commit-message:\n      prefix: 'terraform'\n    schedule:\n      interval: 'weekly'\n\n  ```\n\n### Create a `.github/workflows/generate_dependabot.yml` file\n\nThe action does not create a PR or otherwise commit the generated file, so we can use another action like peter-evans/create-pull-request to do that.\n\n```yaml\nname: Generate dependabot.yml\n\non:\n  push:\n  repository_dispatch:\n  workflow_dispatch:\n\njobs:\n  generate:\n    runs-on: ubuntu-latest\n    steps:\n      \n      - uses: actions/checkout@v3\n        \n      - name: Generate dependabot.yml\n        uses: Makeshift/generate-dependabot-glob-action@master\n\n      - name: Create Pull Request\n        uses: peter-evans/create-pull-request@v4\n```\n\nDone. Now, whenever you push to the repository, or manually trigger the workflow, a PR will be created with the generated `dependabot.yml` file matching your wildcards if they've changed.\n\n\u003c!-- action-docs-inputs --\u003e\n## Inputs\n\n| parameter | description | required | default |\n| --- | --- | --- | --- |\n| template-file | Location of the file to use as template | `false` | .github/dependabot.template.yml |\n| follow-symbolic-links | Indicates whether to follow symbolic links (If you want to put your template in a weird place) | `false` | true |\n| file-header | Header to add to the generated file. ${input-name} will be replaced with the value of the given input. | `false` | # This file was generated by the \"Generate Dependabot Glob\" action. Do not edit it directly. # Make changes to `${template-file}` and a PR will be automatically created.  |\n\u003c!-- action-docs-inputs --\u003e\n\n\u003c!-- action-docs-outputs --\u003e\n\n\u003c!-- action-docs-outputs --\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMakeshift%2Fgenerate-dependabot-glob-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FMakeshift%2Fgenerate-dependabot-glob-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMakeshift%2Fgenerate-dependabot-glob-action/lists"}