[{"data":1,"prerenderedAt":4},["ShallowReactive",2],{"readme-html:EDM115\u002Fshared-files:master":3},"\u003Ch1 id=\"shared-files\" tabindex=\"-1\">\u003Cspan\n                class=\"header-copy-icon\"\n                role=\"button\"\n                data-slug=\"shared-files\"\n              >\n                \u003Csvg>\u003Cpath fill=\"currentColor\" d=\"M10.59 13.41c.41.39.41 1.03 0 1.42c-.39.39-1.03.39-1.42 0a5.003 5.003 0 0 1 0-7.07l3.54-3.54a5.003 5.003 0 0 1 7.07 0a5.003 5.003 0 0 1 0 7.07l-1.49 1.49c.01-.82-.12-1.64-.4-2.42l.47-.48a2.98 2.98 0 0 0 0-4.24a2.98 2.98 0 0 0-4.24 0l-3.53 3.53a2.98 2.98 0 0 0 0 4.24m2.82-4.24c.39-.39 1.03-.39 1.42 0a5.003 5.003 0 0 1 0 7.07l-3.54 3.54a5.003 5.003 0 0 1-7.07 0a5.003 5.003 0 0 1 0-7.07l1.49-1.49c-.01.82.12 1.64.4 2.43l-.47.47a2.98 2.98 0 0 0 0 4.24a2.98 2.98 0 0 0 4.24 0l3.53-3.53a2.98 2.98 0 0 0 0-4.24a.973.973 0 0 1 0-1.42\"\u002F>\u003C\u002Fsvg>\n              \u003C\u002Fspan>\u003Ca class=\"header-anchor\" href=\"#shared-files\">shared-files\u003C\u002Fa>\u003C\u002Fh1>\n\u003Cp>A simple way to share files across multiple repos without editing them manually.\u003Cbr>\nWrite once, push anywhere 😄\u003C\u002Fp>\n\u003Ch2 id=\"premise\" tabindex=\"-1\">\u003Cspan\n                class=\"header-copy-icon\"\n                role=\"button\"\n                data-slug=\"premise\"\n              >\n                \u003Csvg>\u003Cpath fill=\"currentColor\" d=\"M10.59 13.41c.41.39.41 1.03 0 1.42c-.39.39-1.03.39-1.42 0a5.003 5.003 0 0 1 0-7.07l3.54-3.54a5.003 5.003 0 0 1 7.07 0a5.003 5.003 0 0 1 0 7.07l-1.49 1.49c.01-.82-.12-1.64-.4-2.42l.47-.48a2.98 2.98 0 0 0 0-4.24a2.98 2.98 0 0 0-4.24 0l-3.53 3.53a2.98 2.98 0 0 0 0 4.24m2.82-4.24c.39-.39 1.03-.39 1.42 0a5.003 5.003 0 0 1 0 7.07l-3.54 3.54a5.003 5.003 0 0 1-7.07 0a5.003 5.003 0 0 1 0-7.07l1.49-1.49c-.01.82.12 1.64.4 2.43l-.47.47a2.98 2.98 0 0 0 0 4.24a2.98 2.98 0 0 0 4.24 0l3.53-3.53a2.98 2.98 0 0 0 0-4.24a.973.973 0 0 1 0-1.42\"\u002F>\u003C\u002Fsvg>\n              \u003C\u002Fspan>\u003Ca class=\"header-anchor\" href=\"#premise\">Premise\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cp>This repo is meant to be used in a GitHub organization or user account with multiple repos.\u003Cbr>\nIt allows you to share files across those repos without having to edit them manually one repo at a time.\u003Cbr>\nIt uses GitHub Actions to automatically open PRs in the repos you want to update whenever you push changes to the files in this repo. If a PR already exists, it simply updates it.\u003Cbr>\nThe idea of this repo emerged from my internship at Nexelec.\u003C\u002Fp>\n\u003Ch2 id=\"usage\" tabindex=\"-1\">\u003Cspan\n                class=\"header-copy-icon\"\n                role=\"button\"\n                data-slug=\"usage\"\n              >\n                \u003Csvg>\u003Cpath fill=\"currentColor\" d=\"M10.59 13.41c.41.39.41 1.03 0 1.42c-.39.39-1.03.39-1.42 0a5.003 5.003 0 0 1 0-7.07l3.54-3.54a5.003 5.003 0 0 1 7.07 0a5.003 5.003 0 0 1 0 7.07l-1.49 1.49c.01-.82-.12-1.64-.4-2.42l.47-.48a2.98 2.98 0 0 0 0-4.24a2.98 2.98 0 0 0-4.24 0l-3.53 3.53a2.98 2.98 0 0 0 0 4.24m2.82-4.24c.39-.39 1.03-.39 1.42 0a5.003 5.003 0 0 1 0 7.07l-3.54 3.54a5.003 5.003 0 0 1-7.07 0a5.003 5.003 0 0 1 0-7.07l1.49-1.49c-.01.82.12 1.64.4 2.43l-.47.47a2.98 2.98 0 0 0 0 4.24a2.98 2.98 0 0 0 4.24 0l3.53-3.53a2.98 2.98 0 0 0 0-4.24a.973.973 0 0 1 0-1.42\"\u002F>\u003C\u002Fsvg>\n              \u003C\u002Fspan>\u003Ca class=\"header-anchor\" href=\"#usage\">Usage\u003C\u002Fa>\u003C\u002Fh2>\n\u003Ch3 id=\"first-time-usage\" tabindex=\"-1\">\u003Cspan\n                class=\"header-copy-icon\"\n                role=\"button\"\n                data-slug=\"first-time-usage\"\n              >\n                \u003Csvg>\u003Cpath fill=\"currentColor\" d=\"M10.59 13.41c.41.39.41 1.03 0 1.42c-.39.39-1.03.39-1.42 0a5.003 5.003 0 0 1 0-7.07l3.54-3.54a5.003 5.003 0 0 1 7.07 0a5.003 5.003 0 0 1 0 7.07l-1.49 1.49c.01-.82-.12-1.64-.4-2.42l.47-.48a2.98 2.98 0 0 0 0-4.24a2.98 2.98 0 0 0-4.24 0l-3.53 3.53a2.98 2.98 0 0 0 0 4.24m2.82-4.24c.39-.39 1.03-.39 1.42 0a5.003 5.003 0 0 1 0 7.07l-3.54 3.54a5.003 5.003 0 0 1-7.07 0a5.003 5.003 0 0 1 0-7.07l1.49-1.49c-.01.82.12 1.64.4 2.43l-.47.47a2.98 2.98 0 0 0 0 4.24a2.98 2.98 0 0 0 4.24 0l3.53-3.53a2.98 2.98 0 0 0 0-4.24a.973.973 0 0 1 0-1.42\"\u002F>\u003C\u002Fsvg>\n              \u003C\u002Fspan>\u003Ca class=\"header-anchor\" href=\"#first-time-usage\">First time usage\u003C\u002Fa>\u003C\u002Fh3>\n\u003Col start=\"0\">\n\u003Cli>Copy the \u003Ccode class=\"hljs\">\u003Cspan class=\"hljs-title\">.github\u003C\u002Fspan>\u003C\u002Fcode> and \u003Ccode class=\"hljs\">\u003Cspan class=\"hljs-class\">\u003Cspan class=\"hljs-keyword\">data\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode> folders to the root of your repo.\u003C\u002Fli>\n\u003Cli>In \u003Ca href=\"https:\u002F\u002Fgithub.com\u002FEDM115\u002Fshared-files\u002Fblob\u002Fmaster\u002F.github\u002Fworkflows\u002Fauto-update.yml\" target=\"_blank\" rel=\"noopener noreferrer\">\u003Ccode class=\"hljs\">.github\u002Fworkflows\u002F\u003Cspan class=\"hljs-built_in\">auto\u003C\u002Fspan>-update.yml\u003C\u002Fcode>\u003C\u002Fa>, edit the \u003Ccode class=\"hljs\">\u003Cspan class=\"hljs-attribute\">ORG\u003C\u002Fspan>\u003C\u002Fcode> env var (line 82) to your GitHub username\u002Forganization name. If your ORG\u002Fuser default branch isn’t \u003Ccode class=\"hljs\">\u003Cspan class=\"hljs-literal\">master\u003C\u002Fspan>\u003C\u002Fcode>, change that in line 115. If the default branch of that repo isn’t \u003Ccode class=\"hljs\">\u003Cspan class=\"hljs-literal\">master\u003C\u002Fspan>\u003C\u002Fcode> either, change that on line 6.\u003C\u002Fli>\n\u003Cli>Edit \u003Ca href=\"https:\u002F\u002Fgithub.com\u002FEDM115\u002Fshared-files\u002Fblob\u002Fmaster\u002Fdata\u002Ffiles_to_check.json\" target=\"_blank\" rel=\"noopener noreferrer\">\u003Ccode class=\"hljs\">\u003Cspan class=\"hljs-class\">\u003Cspan class=\"hljs-keyword\">data\u003C\u002Fspan>\u002Ffiles_to_check.json\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fa> to add the files you want to check. The format is as follows : the key is the path to the file in this repo and the value is the path to the file in the repos you want to update. This is done in order to allow some nested files to be updated without creating unnecessary folders here. Example :\u003C\u002Fli>\n\u003C\u002Fol>\n\n          \u003Cdiv class='code-block'>\n            \u003Cdiv class='code-block-header'>\n              \u003Cspan class='code-block-lang'>json\u003C\u002Fspan>\n              \u003Cbutton class='copy-code-button' type='button'>\n                Copy\n              \u003C\u002Fbutton>\n            \u003C\u002Fdiv>\n            \u003Cpre>\u003Ccode class='hljs json'>\u003Cspan class=\"hljs-punctuation\">{\u003C\u002Fspan>\n  \u003Cspan class=\"hljs-attr\">&quot;release.yml&quot;\u003C\u002Fspan>\u003Cspan class=\"hljs-punctuation\">:\u003C\u002Fspan> \u003Cspan class=\"hljs-string\">&quot;.github\u002Frelease.yml&quot;\u003C\u002Fspan>\u003Cspan class=\"hljs-punctuation\">,\u003C\u002Fspan>\n  \u003Cspan class=\"hljs-attr\">&quot;FUNDING.yml&quot;\u003C\u002Fspan>\u003Cspan class=\"hljs-punctuation\">:\u003C\u002Fspan> \u003Cspan class=\"hljs-string\">&quot;.github\u002FFUNDING.yml&quot;\u003C\u002Fspan>\u003Cspan class=\"hljs-punctuation\">,\u003C\u002Fspan>\n  \u003Cspan class=\"hljs-attr\">&quot;bug_report.md&quot;\u003C\u002Fspan>\u003Cspan class=\"hljs-punctuation\">:\u003C\u002Fspan> \u003Cspan class=\"hljs-string\">&quot;.github\u002FISSUE_TEMPLATE\u002Fbug_report.md&quot;\u003C\u002Fspan>\n\u003Cspan class=\"hljs-punctuation\">}\u003C\u002Fspan>\n\u003C\u002Fcode>\u003C\u002Fpre>\n          \u003C\u002Fdiv>\n        \u003Col start=\"3\">\n\u003Cli>Edit the \u003Ca href=\"https:\u002F\u002Fgithub.com\u002FEDM115\u002Fshared-files\u002Fblob\u002Fmaster\u002Fdata\u002Frepos.json\" target=\"_blank\" rel=\"noopener noreferrer\">\u003Ccode class=\"hljs\">\u003Cspan class=\"hljs-class\">\u003Cspan class=\"hljs-keyword\">data\u003C\u002Fspan>\u002Frepos.json\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fa> file to add the repos you want to update. It’s an array of repo names, and wildcards are allowed, so for example \u003Ccode class=\"hljs\">\u003Cspan class=\"hljs-string\">&quot;repo&quot;\u003C\u002Fspan>\u003C\u002Fcode> will match \u003Ccode class=\"hljs\">\u003Cspan class=\"hljs-string\">&quot;ORG\u002Frepo&quot;\u003C\u002Fspan>\u003C\u002Fcode>, \u003Ccode class=\"hljs\">\u003Cspan class=\"hljs-string\">&quot;project-*&quot;\u003C\u002Fspan>\u003C\u002Fcode> will match \u003Ccode class=\"hljs\">\u003Cspan class=\"hljs-string\">&quot;ORG\u002Fproject-1&quot;\u003C\u002Fspan>\u003C\u002Fcode>, \u003Ccode class=\"hljs\">\u003Cspan class=\"hljs-string\">&quot;ORG\u002Fproject-2&quot;\u003C\u002Fspan>\u003C\u002Fcode>, … Beware ! It isn’t possible to just specify \u003Ccode class=\"hljs\">\u003Cspan class=\"hljs-string\">&quot;*&quot;\u003C\u002Fspan>\u003C\u002Fcode>, as it will create an endless loop since it will want to update this very repo too. The format is as follows :\u003C\u002Fli>\n\u003C\u002Fol>\n\n          \u003Cdiv class='code-block'>\n            \u003Cdiv class='code-block-header'>\n              \u003Cspan class='code-block-lang'>json\u003C\u002Fspan>\n              \u003Cbutton class='copy-code-button' type='button'>\n                Copy\n              \u003C\u002Fbutton>\n            \u003C\u002Fdiv>\n            \u003Cpre>\u003Ccode class='hljs json'>\u003Cspan class=\"hljs-punctuation\">[\u003C\u002Fspan> \u003Cspan class=\"hljs-string\">&quot;repo&quot;\u003C\u002Fspan>\u003Cspan class=\"hljs-punctuation\">,\u003C\u002Fspan> \u003Cspan class=\"hljs-string\">&quot;project-*&quot;\u003C\u002Fspan> \u003Cspan class=\"hljs-punctuation\">]\u003C\u002Fspan>\n\u003C\u002Fcode>\u003C\u002Fpre>\n          \u003C\u002Fdiv>\n        \u003Col start=\"4\">\n\u003Cli>If it’s the first time you run this repo, empty the content of \u003Ca href=\"https:\u002F\u002Fgithub.com\u002FEDM115\u002Fshared-files\u002Fblob\u002Fmaster\u002Fdata\u002Flast_processed_commit.json\" target=\"_blank\" rel=\"noopener noreferrer\">\u003Ccode class=\"hljs\">\u003Cspan class=\"hljs-class\">\u003Cspan class=\"hljs-keyword\">data\u003C\u002Fspan>\u002Flast_processed_commit.json\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fa>. This will force the workflow to run fresh. After processing your repos, it’s automatically updated with the last commit hash oh this repo in order to process the delta at each run. Format is as follows :\u003C\u002Fli>\n\u003C\u002Fol>\n\n          \u003Cdiv class='code-block'>\n            \u003Cdiv class='code-block-header'>\n              \u003Cspan class='code-block-lang'>json\u003C\u002Fspan>\n              \u003Cbutton class='copy-code-button' type='button'>\n                Copy\n              \u003C\u002Fbutton>\n            \u003C\u002Fdiv>\n            \u003Cpre>\u003Ccode class='hljs json'>\u003Cspan class=\"hljs-punctuation\">{\u003C\u002Fspan> \u003Cspan class=\"hljs-attr\">&quot;commit&quot;\u003C\u002Fspan>\u003Cspan class=\"hljs-punctuation\">:\u003C\u002Fspan> \u003Cspan class=\"hljs-string\">&quot;123456abc&quot;\u003C\u002Fspan> \u003Cspan class=\"hljs-punctuation\">}\u003C\u002Fspan>\n\u003C\u002Fcode>\u003C\u002Fpre>\n          \u003C\u002Fdiv>\n        \u003Col start=\"5\">\n\u003Cli>You must create a \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fsettings\u002Fpersonal-access-tokens\" target=\"_blank\" rel=\"noopener noreferrer\">PAT\u003C\u002Fa> (can be a fine-grained one) in order to access the ORG\u002Fuser (yes it works for private repos too !). The user who creates the PAT will be the user opening the PRs. Here’s the token properties :\u003C\u002Fli>\n\u003C\u002Fol>\n\u003Cul>\n\u003Cli>\u003Cstrong>Resource owner\u003C\u002Fstrong> : The user\u002Forganization name of the repos you want to update\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Expiration\u003C\u002Fstrong> : No expiration (or as you want, but it will need to be updated when it expires)\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Repository access\u003C\u002Fstrong> : All repositories\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Repository permissions\u003C\u002Fstrong> :\n\u003Cul>\n\u003Cli>\u003Cstrong>Contents\u003C\u002Fstrong> : Read and write\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Metadata\u003C\u002Fstrong> : Read-only\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Pull requests\u003C\u002Fstrong> : Read and write\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Workflows\u003C\u002Fstrong> : Read and write\u003Cbr>\nGo in your repo’s Settings -&gt; Secrets and variables -&gt; Actions -&gt; New repository secret. Name it exactly \u003Ccode class=\"hljs\">\u003Cspan class=\"hljs-attribute\">PAT\u003C\u002Fspan>\u003C\u002Fcode> and paste the token you just created.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Col start=\"6\">\n\u003Cli>Commit and push the changes to your repo. The workflow will run automatically and update the files in the repos you specified by opening a PR. You can check the logs of the workflow in the Actions tab of your repo.\u003C\u002Fli>\n\u003C\u002Fol>\n\u003Ch3 id=\"further-updates\" tabindex=\"-1\">\u003Cspan\n                class=\"header-copy-icon\"\n                role=\"button\"\n                data-slug=\"further-updates\"\n              >\n                \u003Csvg>\u003Cpath fill=\"currentColor\" d=\"M10.59 13.41c.41.39.41 1.03 0 1.42c-.39.39-1.03.39-1.42 0a5.003 5.003 0 0 1 0-7.07l3.54-3.54a5.003 5.003 0 0 1 7.07 0a5.003 5.003 0 0 1 0 7.07l-1.49 1.49c.01-.82-.12-1.64-.4-2.42l.47-.48a2.98 2.98 0 0 0 0-4.24a2.98 2.98 0 0 0-4.24 0l-3.53 3.53a2.98 2.98 0 0 0 0 4.24m2.82-4.24c.39-.39 1.03-.39 1.42 0a5.003 5.003 0 0 1 0 7.07l-3.54 3.54a5.003 5.003 0 0 1-7.07 0a5.003 5.003 0 0 1 0-7.07l1.49-1.49c-.01.82.12 1.64.4 2.43l-.47.47a2.98 2.98 0 0 0 0 4.24a2.98 2.98 0 0 0 4.24 0l3.53-3.53a2.98 2.98 0 0 0 0-4.24a.973.973 0 0 1 0-1.42\"\u002F>\u003C\u002Fsvg>\n              \u003C\u002Fspan>\u003Ca class=\"header-anchor\" href=\"#further-updates\">Further updates\u003C\u002Fa>\u003C\u002Fh3>\n\u003Cp>Whenever you need, either adding a new file to propagate, editing one of the already existing ones or adding\u002Fremoving a new repo, simply add\u002Fedit the needed files and push the changes.\u003C\u002Fp>\n",1779532541112]