├── .github ├── actions │ └── gitignore-parser-action │ │ ├── README.md │ │ ├── action.yml │ │ ├── dist │ │ └── index.js │ │ ├── lib │ │ └── gradeLearner.js │ │ ├── main.js │ │ ├── package-lock.json │ │ └── package.json └── workflows │ └── grading.yml ├── .gitignore ├── LICENSE └── README.md /.github/actions/gitignore-parser-action/README.md: -------------------------------------------------------------------------------- 1 | # gitignore Parser Action 2 | 3 | This local action runs whenever a change to the `.gitignore` file is pushed to your repository. 4 | 5 | This action requires no additional inputs 6 | 7 | ## What checks does this action conduct? 8 | 9 | - Reads the contents of the `.gitignore` file 10 | - Attempts to compare the above contents against a desired answer set 11 | - Reports the status of the comparison to the Looking Glass action in the `grading.yml` workflow 12 | -------------------------------------------------------------------------------- /.github/actions/gitignore-parser-action/action.yml: -------------------------------------------------------------------------------- 1 | name: gitignore parser 2 | author: githubtraining 3 | description: validation action for this exercise 4 | runs: 5 | using: node12 6 | main: "dist/index.js" 7 | -------------------------------------------------------------------------------- /.github/actions/gitignore-parser-action/dist/index.js: -------------------------------------------------------------------------------- 1 | module.exports = 2 | /******/ (function(modules, runtime) { // webpackBootstrap 3 | /******/ "use strict"; 4 | /******/ // The module cache 5 | /******/ var installedModules = {}; 6 | /******/ 7 | /******/ // The require function 8 | /******/ function __webpack_require__(moduleId) { 9 | /******/ 10 | /******/ // Check if module is in cache 11 | /******/ if(installedModules[moduleId]) { 12 | /******/ return installedModules[moduleId].exports; 13 | /******/ } 14 | /******/ // Create a new module (and put it into the cache) 15 | /******/ var module = installedModules[moduleId] = { 16 | /******/ i: moduleId, 17 | /******/ l: false, 18 | /******/ exports: {} 19 | /******/ }; 20 | /******/ 21 | /******/ // Execute the module function 22 | /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); 23 | /******/ 24 | /******/ // Flag the module as loaded 25 | /******/ module.l = true; 26 | /******/ 27 | /******/ // Return the exports of the module 28 | /******/ return module.exports; 29 | /******/ } 30 | /******/ 31 | /******/ 32 | /******/ __webpack_require__.ab = __dirname + "/"; 33 | /******/ 34 | /******/ // the startup function 35 | /******/ function startup() { 36 | /******/ // Load entry module and return exports 37 | /******/ return __webpack_require__(948); 38 | /******/ }; 39 | /******/ 40 | /******/ // run startup 41 | /******/ return startup(); 42 | /******/ }) 43 | /************************************************************************/ 44 | /******/ ({ 45 | 46 | /***/ 87: 47 | /***/ (function(module) { 48 | 49 | module.exports = require("os"); 50 | 51 | /***/ }), 52 | 53 | /***/ 203: 54 | /***/ (function(__unusedmodule, exports, __webpack_require__) { 55 | 56 | "use strict"; 57 | 58 | var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { 59 | if (k2 === undefined) k2 = k; 60 | Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); 61 | }) : (function(o, m, k, k2) { 62 | if (k2 === undefined) k2 = k; 63 | o[k2] = m[k]; 64 | })); 65 | var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { 66 | Object.defineProperty(o, "default", { enumerable: true, value: v }); 67 | }) : function(o, v) { 68 | o["default"] = v; 69 | }); 70 | var __importStar = (this && this.__importStar) || function (mod) { 71 | if (mod && mod.__esModule) return mod; 72 | var result = {}; 73 | if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); 74 | __setModuleDefault(result, mod); 75 | return result; 76 | }; 77 | Object.defineProperty(exports, "__esModule", { value: true }); 78 | exports.issue = exports.issueCommand = void 0; 79 | const os = __importStar(__webpack_require__(87)); 80 | const utils_1 = __webpack_require__(634); 81 | /** 82 | * Commands 83 | * 84 | * Command Format: 85 | * ::name key=value,key=value::message 86 | * 87 | * Examples: 88 | * ::warning::This is the message 89 | * ::set-env name=MY_VAR::some value 90 | */ 91 | function issueCommand(command, properties, message) { 92 | const cmd = new Command(command, properties, message); 93 | process.stdout.write(cmd.toString() + os.EOL); 94 | } 95 | exports.issueCommand = issueCommand; 96 | function issue(name, message = '') { 97 | issueCommand(name, {}, message); 98 | } 99 | exports.issue = issue; 100 | const CMD_STRING = '::'; 101 | class Command { 102 | constructor(command, properties, message) { 103 | if (!command) { 104 | command = 'missing.command'; 105 | } 106 | this.command = command; 107 | this.properties = properties; 108 | this.message = message; 109 | } 110 | toString() { 111 | let cmdStr = CMD_STRING + this.command; 112 | if (this.properties && Object.keys(this.properties).length > 0) { 113 | cmdStr += ' '; 114 | let first = true; 115 | for (const key in this.properties) { 116 | if (this.properties.hasOwnProperty(key)) { 117 | const val = this.properties[key]; 118 | if (val) { 119 | if (first) { 120 | first = false; 121 | } 122 | else { 123 | cmdStr += ','; 124 | } 125 | cmdStr += `${key}=${escapeProperty(val)}`; 126 | } 127 | } 128 | } 129 | } 130 | cmdStr += `${CMD_STRING}${escapeData(this.message)}`; 131 | return cmdStr; 132 | } 133 | } 134 | function escapeData(s) { 135 | return utils_1.toCommandValue(s) 136 | .replace(/%/g, '%25') 137 | .replace(/\r/g, '%0D') 138 | .replace(/\n/g, '%0A'); 139 | } 140 | function escapeProperty(s) { 141 | return utils_1.toCommandValue(s) 142 | .replace(/%/g, '%25') 143 | .replace(/\r/g, '%0D') 144 | .replace(/\n/g, '%0A') 145 | .replace(/:/g, '%3A') 146 | .replace(/,/g, '%2C'); 147 | } 148 | //# sourceMappingURL=command.js.map 149 | 150 | /***/ }), 151 | 152 | /***/ 244: 153 | /***/ (function(module, __unusedexports, __webpack_require__) { 154 | 155 | const fs = __webpack_require__(747); 156 | module.exports = () => { 157 | const gitingnore = `${process.env.GITHUB_WORKSPACE}/.gitignore`; 158 | 159 | const answers = ["z*", ".env", "/artifacts/"]; 160 | const contents = fs.readFileSync(gitingnore, "utf8").split("\n"); 161 | try { 162 | const results = answers.filter((i) => { 163 | if (!contents.includes(i)) return i; 164 | }); 165 | if (results.length === 0) { 166 | return { 167 | reports: [ 168 | { 169 | filename: ".gitignore", 170 | isCorrect: true, 171 | display_type: "actions", 172 | level: "info", 173 | msg: "Great job! You have sucessfully configured the .gitignore file for this repository", 174 | error: { 175 | expected: "", 176 | got: "", 177 | }, 178 | }, 179 | ], 180 | }; 181 | } else { 182 | return { 183 | reports: [ 184 | { 185 | filename: ".gitignore", 186 | isCorrect: false, 187 | display_type: "actions", 188 | level: "warning", 189 | msg: "Incorrect solution", 190 | error: { 191 | expected: ".env, /artifacts/, z* to exist in the .gitignore file", 192 | got: `You are missing ${results.join()}`, 193 | }, 194 | }, 195 | ], 196 | }; 197 | } 198 | } catch (error) { 199 | return { 200 | reports: [ 201 | { 202 | filename: ".gitignore", 203 | isCorrect: false, 204 | display_type: "actions", 205 | level: "fatal", 206 | msg: "Error", 207 | error: { 208 | expected: "", 209 | got: "An internal error occured. Please open an issue at: https://github.com/githubtraining/exercise-use-gitignore and let us know! Thank you", 210 | }, 211 | }, 212 | ], 213 | }; 214 | } 215 | }; 216 | 217 | 218 | /***/ }), 219 | 220 | /***/ 418: 221 | /***/ (function(__unusedmodule, exports, __webpack_require__) { 222 | 223 | "use strict"; 224 | 225 | var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { 226 | if (k2 === undefined) k2 = k; 227 | Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); 228 | }) : (function(o, m, k, k2) { 229 | if (k2 === undefined) k2 = k; 230 | o[k2] = m[k]; 231 | })); 232 | var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { 233 | Object.defineProperty(o, "default", { enumerable: true, value: v }); 234 | }) : function(o, v) { 235 | o["default"] = v; 236 | }); 237 | var __importStar = (this && this.__importStar) || function (mod) { 238 | if (mod && mod.__esModule) return mod; 239 | var result = {}; 240 | if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); 241 | __setModuleDefault(result, mod); 242 | return result; 243 | }; 244 | var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { 245 | function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } 246 | return new (P || (P = Promise))(function (resolve, reject) { 247 | function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } 248 | function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } 249 | function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } 250 | step((generator = generator.apply(thisArg, _arguments || [])).next()); 251 | }); 252 | }; 253 | Object.defineProperty(exports, "__esModule", { value: true }); 254 | exports.getState = exports.saveState = exports.group = exports.endGroup = exports.startGroup = exports.info = exports.warning = exports.error = exports.debug = exports.isDebug = exports.setFailed = exports.setCommandEcho = exports.setOutput = exports.getBooleanInput = exports.getMultilineInput = exports.getInput = exports.addPath = exports.setSecret = exports.exportVariable = exports.ExitCode = void 0; 255 | const command_1 = __webpack_require__(203); 256 | const file_command_1 = __webpack_require__(814); 257 | const utils_1 = __webpack_require__(634); 258 | const os = __importStar(__webpack_require__(87)); 259 | const path = __importStar(__webpack_require__(622)); 260 | /** 261 | * The code to exit an action 262 | */ 263 | var ExitCode; 264 | (function (ExitCode) { 265 | /** 266 | * A code indicating that the action was successful 267 | */ 268 | ExitCode[ExitCode["Success"] = 0] = "Success"; 269 | /** 270 | * A code indicating that the action was a failure 271 | */ 272 | ExitCode[ExitCode["Failure"] = 1] = "Failure"; 273 | })(ExitCode = exports.ExitCode || (exports.ExitCode = {})); 274 | //----------------------------------------------------------------------- 275 | // Variables 276 | //----------------------------------------------------------------------- 277 | /** 278 | * Sets env variable for this action and future actions in the job 279 | * @param name the name of the variable to set 280 | * @param val the value of the variable. Non-string values will be converted to a string via JSON.stringify 281 | */ 282 | // eslint-disable-next-line @typescript-eslint/no-explicit-any 283 | function exportVariable(name, val) { 284 | const convertedVal = utils_1.toCommandValue(val); 285 | process.env[name] = convertedVal; 286 | const filePath = process.env['GITHUB_ENV'] || ''; 287 | if (filePath) { 288 | const delimiter = '_GitHubActionsFileCommandDelimeter_'; 289 | const commandValue = `${name}<<${delimiter}${os.EOL}${convertedVal}${os.EOL}${delimiter}`; 290 | file_command_1.issueCommand('ENV', commandValue); 291 | } 292 | else { 293 | command_1.issueCommand('set-env', { name }, convertedVal); 294 | } 295 | } 296 | exports.exportVariable = exportVariable; 297 | /** 298 | * Registers a secret which will get masked from logs 299 | * @param secret value of the secret 300 | */ 301 | function setSecret(secret) { 302 | command_1.issueCommand('add-mask', {}, secret); 303 | } 304 | exports.setSecret = setSecret; 305 | /** 306 | * Prepends inputPath to the PATH (for this action and future actions) 307 | * @param inputPath 308 | */ 309 | function addPath(inputPath) { 310 | const filePath = process.env['GITHUB_PATH'] || ''; 311 | if (filePath) { 312 | file_command_1.issueCommand('PATH', inputPath); 313 | } 314 | else { 315 | command_1.issueCommand('add-path', {}, inputPath); 316 | } 317 | process.env['PATH'] = `${inputPath}${path.delimiter}${process.env['PATH']}`; 318 | } 319 | exports.addPath = addPath; 320 | /** 321 | * Gets the value of an input. 322 | * Unless trimWhitespace is set to false in InputOptions, the value is also trimmed. 323 | * Returns an empty string if the value is not defined. 324 | * 325 | * @param name name of the input to get 326 | * @param options optional. See InputOptions. 327 | * @returns string 328 | */ 329 | function getInput(name, options) { 330 | const val = process.env[`INPUT_${name.replace(/ /g, '_').toUpperCase()}`] || ''; 331 | if (options && options.required && !val) { 332 | throw new Error(`Input required and not supplied: ${name}`); 333 | } 334 | if (options && options.trimWhitespace === false) { 335 | return val; 336 | } 337 | return val.trim(); 338 | } 339 | exports.getInput = getInput; 340 | /** 341 | * Gets the values of an multiline input. Each value is also trimmed. 342 | * 343 | * @param name name of the input to get 344 | * @param options optional. See InputOptions. 345 | * @returns string[] 346 | * 347 | */ 348 | function getMultilineInput(name, options) { 349 | const inputs = getInput(name, options) 350 | .split('\n') 351 | .filter(x => x !== ''); 352 | return inputs; 353 | } 354 | exports.getMultilineInput = getMultilineInput; 355 | /** 356 | * Gets the input value of the boolean type in the YAML 1.2 "core schema" specification. 357 | * Support boolean input list: `true | True | TRUE | false | False | FALSE` . 358 | * The return value is also in boolean type. 359 | * ref: https://yaml.org/spec/1.2/spec.html#id2804923 360 | * 361 | * @param name name of the input to get 362 | * @param options optional. See InputOptions. 363 | * @returns boolean 364 | */ 365 | function getBooleanInput(name, options) { 366 | const trueValue = ['true', 'True', 'TRUE']; 367 | const falseValue = ['false', 'False', 'FALSE']; 368 | const val = getInput(name, options); 369 | if (trueValue.includes(val)) 370 | return true; 371 | if (falseValue.includes(val)) 372 | return false; 373 | throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${name}\n` + 374 | `Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); 375 | } 376 | exports.getBooleanInput = getBooleanInput; 377 | /** 378 | * Sets the value of an output. 379 | * 380 | * @param name name of the output to set 381 | * @param value value to store. Non-string values will be converted to a string via JSON.stringify 382 | */ 383 | // eslint-disable-next-line @typescript-eslint/no-explicit-any 384 | function setOutput(name, value) { 385 | process.stdout.write(os.EOL); 386 | command_1.issueCommand('set-output', { name }, value); 387 | } 388 | exports.setOutput = setOutput; 389 | /** 390 | * Enables or disables the echoing of commands into stdout for the rest of the step. 391 | * Echoing is disabled by default if ACTIONS_STEP_DEBUG is not set. 392 | * 393 | */ 394 | function setCommandEcho(enabled) { 395 | command_1.issue('echo', enabled ? 'on' : 'off'); 396 | } 397 | exports.setCommandEcho = setCommandEcho; 398 | //----------------------------------------------------------------------- 399 | // Results 400 | //----------------------------------------------------------------------- 401 | /** 402 | * Sets the action status to failed. 403 | * When the action exits it will be with an exit code of 1 404 | * @param message add error issue message 405 | */ 406 | function setFailed(message) { 407 | process.exitCode = ExitCode.Failure; 408 | error(message); 409 | } 410 | exports.setFailed = setFailed; 411 | //----------------------------------------------------------------------- 412 | // Logging Commands 413 | //----------------------------------------------------------------------- 414 | /** 415 | * Gets whether Actions Step Debug is on or not 416 | */ 417 | function isDebug() { 418 | return process.env['RUNNER_DEBUG'] === '1'; 419 | } 420 | exports.isDebug = isDebug; 421 | /** 422 | * Writes debug message to user log 423 | * @param message debug message 424 | */ 425 | function debug(message) { 426 | command_1.issueCommand('debug', {}, message); 427 | } 428 | exports.debug = debug; 429 | /** 430 | * Adds an error issue 431 | * @param message error issue message. Errors will be converted to string via toString() 432 | */ 433 | function error(message) { 434 | command_1.issue('error', message instanceof Error ? message.toString() : message); 435 | } 436 | exports.error = error; 437 | /** 438 | * Adds an warning issue 439 | * @param message warning issue message. Errors will be converted to string via toString() 440 | */ 441 | function warning(message) { 442 | command_1.issue('warning', message instanceof Error ? message.toString() : message); 443 | } 444 | exports.warning = warning; 445 | /** 446 | * Writes info to log with console.log. 447 | * @param message info message 448 | */ 449 | function info(message) { 450 | process.stdout.write(message + os.EOL); 451 | } 452 | exports.info = info; 453 | /** 454 | * Begin an output group. 455 | * 456 | * Output until the next `groupEnd` will be foldable in this group 457 | * 458 | * @param name The name of the output group 459 | */ 460 | function startGroup(name) { 461 | command_1.issue('group', name); 462 | } 463 | exports.startGroup = startGroup; 464 | /** 465 | * End an output group. 466 | */ 467 | function endGroup() { 468 | command_1.issue('endgroup'); 469 | } 470 | exports.endGroup = endGroup; 471 | /** 472 | * Wrap an asynchronous function call in a group. 473 | * 474 | * Returns the same type as the function itself. 475 | * 476 | * @param name The name of the group 477 | * @param fn The function to wrap in the group 478 | */ 479 | function group(name, fn) { 480 | return __awaiter(this, void 0, void 0, function* () { 481 | startGroup(name); 482 | let result; 483 | try { 484 | result = yield fn(); 485 | } 486 | finally { 487 | endGroup(); 488 | } 489 | return result; 490 | }); 491 | } 492 | exports.group = group; 493 | //----------------------------------------------------------------------- 494 | // Wrapper action state 495 | //----------------------------------------------------------------------- 496 | /** 497 | * Saves state for current action, the state can only be retrieved by this action's post job execution. 498 | * 499 | * @param name name of the state to store 500 | * @param value value to store. Non-string values will be converted to a string via JSON.stringify 501 | */ 502 | // eslint-disable-next-line @typescript-eslint/no-explicit-any 503 | function saveState(name, value) { 504 | command_1.issueCommand('save-state', { name }, value); 505 | } 506 | exports.saveState = saveState; 507 | /** 508 | * Gets the value of an state set by this action's main execution. 509 | * 510 | * @param name name of the state to get 511 | * @returns string 512 | */ 513 | function getState(name) { 514 | return process.env[`STATE_${name}`] || ''; 515 | } 516 | exports.getState = getState; 517 | //# sourceMappingURL=core.js.map 518 | 519 | /***/ }), 520 | 521 | /***/ 622: 522 | /***/ (function(module) { 523 | 524 | module.exports = require("path"); 525 | 526 | /***/ }), 527 | 528 | /***/ 634: 529 | /***/ (function(__unusedmodule, exports) { 530 | 531 | "use strict"; 532 | 533 | // We use any as a valid input type 534 | /* eslint-disable @typescript-eslint/no-explicit-any */ 535 | Object.defineProperty(exports, "__esModule", { value: true }); 536 | exports.toCommandValue = void 0; 537 | /** 538 | * Sanitizes an input into a string so it can be passed into issueCommand safely 539 | * @param input input to sanitize into a string 540 | */ 541 | function toCommandValue(input) { 542 | if (input === null || input === undefined) { 543 | return ''; 544 | } 545 | else if (typeof input === 'string' || input instanceof String) { 546 | return input; 547 | } 548 | return JSON.stringify(input); 549 | } 550 | exports.toCommandValue = toCommandValue; 551 | //# sourceMappingURL=utils.js.map 552 | 553 | /***/ }), 554 | 555 | /***/ 747: 556 | /***/ (function(module) { 557 | 558 | module.exports = require("fs"); 559 | 560 | /***/ }), 561 | 562 | /***/ 814: 563 | /***/ (function(__unusedmodule, exports, __webpack_require__) { 564 | 565 | "use strict"; 566 | 567 | // For internal use, subject to change. 568 | var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { 569 | if (k2 === undefined) k2 = k; 570 | Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); 571 | }) : (function(o, m, k, k2) { 572 | if (k2 === undefined) k2 = k; 573 | o[k2] = m[k]; 574 | })); 575 | var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { 576 | Object.defineProperty(o, "default", { enumerable: true, value: v }); 577 | }) : function(o, v) { 578 | o["default"] = v; 579 | }); 580 | var __importStar = (this && this.__importStar) || function (mod) { 581 | if (mod && mod.__esModule) return mod; 582 | var result = {}; 583 | if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); 584 | __setModuleDefault(result, mod); 585 | return result; 586 | }; 587 | Object.defineProperty(exports, "__esModule", { value: true }); 588 | exports.issueCommand = void 0; 589 | // We use any as a valid input type 590 | /* eslint-disable @typescript-eslint/no-explicit-any */ 591 | const fs = __importStar(__webpack_require__(747)); 592 | const os = __importStar(__webpack_require__(87)); 593 | const utils_1 = __webpack_require__(634); 594 | function issueCommand(command, message) { 595 | const filePath = process.env[`GITHUB_${command}`]; 596 | if (!filePath) { 597 | throw new Error(`Unable to find environment variable for file command ${command}`); 598 | } 599 | if (!fs.existsSync(filePath)) { 600 | throw new Error(`Missing file at path: ${filePath}`); 601 | } 602 | fs.appendFileSync(filePath, `${utils_1.toCommandValue(message)}${os.EOL}`, { 603 | encoding: 'utf8' 604 | }); 605 | } 606 | exports.issueCommand = issueCommand; 607 | //# sourceMappingURL=file-command.js.map 608 | 609 | /***/ }), 610 | 611 | /***/ 948: 612 | /***/ (function(__unusedmodule, __unusedexports, __webpack_require__) { 613 | 614 | const core = __webpack_require__(418); 615 | 616 | const gradeLearner = __webpack_require__(244); 617 | 618 | async function run() { 619 | try { 620 | const results = gradeLearner(); 621 | core.setOutput("reports", results); 622 | } catch (error) { 623 | core.setFailed(error); 624 | } 625 | } 626 | run(); 627 | 628 | 629 | /***/ }) 630 | 631 | /******/ }); -------------------------------------------------------------------------------- /.github/actions/gitignore-parser-action/lib/gradeLearner.js: -------------------------------------------------------------------------------- 1 | const fs = require("fs"); 2 | module.exports = () => { 3 | const gitingnore = `${process.env.GITHUB_WORKSPACE}/.gitignore`; 4 | 5 | const answers = ["z*", ".env", "/artifacts/"]; 6 | const contents = fs.readFileSync(gitingnore, "utf8").split("\n"); 7 | try { 8 | const results = answers.filter((i) => { 9 | if (!contents.includes(i)) return i; 10 | }); 11 | if (results.length === 0) { 12 | return { 13 | reports: [ 14 | { 15 | filename: ".gitignore", 16 | isCorrect: true, 17 | display_type: "actions", 18 | level: "info", 19 | msg: "Great job! You have sucessfully configured the .gitignore file for this repository", 20 | error: { 21 | expected: "", 22 | got: "", 23 | }, 24 | }, 25 | ], 26 | }; 27 | } else { 28 | return { 29 | reports: [ 30 | { 31 | filename: ".gitignore", 32 | isCorrect: false, 33 | display_type: "actions", 34 | level: "warning", 35 | msg: "Incorrect solution", 36 | error: { 37 | expected: ".env, /artifacts/, z* to exist in the .gitignore file", 38 | got: `You are missing ${results.join()}`, 39 | }, 40 | }, 41 | ], 42 | }; 43 | } 44 | } catch (error) { 45 | return { 46 | reports: [ 47 | { 48 | filename: ".gitignore", 49 | isCorrect: false, 50 | display_type: "actions", 51 | level: "fatal", 52 | msg: "Error", 53 | error: { 54 | expected: "", 55 | got: "An internal error occured. Please open an issue at: https://github.com/githubtraining/exercise-use-gitignore and let us know! Thank you", 56 | }, 57 | }, 58 | ], 59 | }; 60 | } 61 | }; 62 | -------------------------------------------------------------------------------- /.github/actions/gitignore-parser-action/main.js: -------------------------------------------------------------------------------- 1 | const core = require("@actions/core"); 2 | 3 | const gradeLearner = require("./lib/gradeLearner"); 4 | 5 | async function run() { 6 | try { 7 | const results = gradeLearner(); 8 | core.setOutput("reports", results); 9 | } catch (error) { 10 | core.setFailed(error); 11 | } 12 | } 13 | run(); 14 | -------------------------------------------------------------------------------- /.github/actions/gitignore-parser-action/package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "gitignore-parser-action", 3 | "version": "1.0.0", 4 | "lockfileVersion": 1, 5 | "requires": true, 6 | "dependencies": { 7 | "@actions/core": { 8 | "version": "1.4.0", 9 | "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.4.0.tgz", 10 | "integrity": "sha512-CGx2ilGq5i7zSLgiiGUtBCxhRRxibJYU6Fim0Q1Wg2aQL2LTnF27zbqZOrxfvFQ55eSBW0L8uVStgtKMpa0Qlg==" 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /.github/actions/gitignore-parser-action/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "gitignore-parser-action", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "main.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1", 8 | "build": "ncc build main.js" 9 | }, 10 | "author": "mattdavis0351", 11 | "license": "MIT", 12 | "dependencies": { 13 | "@actions/core": "^1.4.0" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /.github/workflows/grading.yml: -------------------------------------------------------------------------------- 1 | name: Grading workflow 2 | on: 3 | push: 4 | paths: 5 | - ".gitignore" 6 | workflow_dispatch: 7 | 8 | jobs: 9 | grade-learner: 10 | if: github.event_name == 'push' 11 | runs-on: ubuntu-latest 12 | steps: 13 | - uses: actions/checkout@v2 14 | - name: Grade gitignore activity 15 | id: events 16 | uses: ./.github/actions/gitignore-parser-action 17 | 18 | - name: Grading results 19 | uses: githubtraining/looking-glass-action@v0.2.0 20 | with: 21 | github-token: ${{ secrets.GITHUB_TOKEN }} 22 | feedback: ${{ steps.events.outputs.reports }} 23 | 24 | troubleshoot-activity: 25 | if: github.event_name == 'workflow_dispatch' 26 | runs-on: ubuntu-latest 27 | steps: 28 | - name: troubleshooting steps 29 | run: echo "If you're stuck, this documentation may be helpful; https://git-scm.com/docs/gitignore" 30 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Attribution 4.0 International 2 | 3 | ======================================================================= 4 | 5 | Creative Commons Corporation ("Creative Commons") is not a law firm and 6 | does not provide legal services or legal advice. Distribution of 7 | Creative Commons public licenses does not create a lawyer-client or 8 | other relationship. Creative Commons makes its licenses and related 9 | information available on an "as-is" basis. Creative Commons gives no 10 | warranties regarding its licenses, any material licensed under their 11 | terms and conditions, or any related information. Creative Commons 12 | disclaims all liability for damages resulting from their use to the 13 | fullest extent possible. 14 | 15 | Using Creative Commons Public Licenses 16 | 17 | Creative Commons public licenses provide a standard set of terms and 18 | conditions that creators and other rights holders may use to share 19 | original works of authorship and other material subject to copyright 20 | and certain other rights specified in the public license below. The 21 | following considerations are for informational purposes only, are not 22 | exhaustive, and do not form part of our licenses. 23 | 24 | Considerations for licensors: Our public licenses are 25 | intended for use by those authorized to give the public 26 | permission to use material in ways otherwise restricted by 27 | copyright and certain other rights. Our licenses are 28 | irrevocable. Licensors should read and understand the terms 29 | and conditions of the license they choose before applying it. 30 | Licensors should also secure all rights necessary before 31 | applying our licenses so that the public can reuse the 32 | material as expected. Licensors should clearly mark any 33 | material not subject to the license. This includes other CC- 34 | licensed material, or material used under an exception or 35 | limitation to copyright. More considerations for licensors: 36 | wiki.creativecommons.org/Considerations_for_licensors 37 | 38 | Considerations for the public: By using one of our public 39 | licenses, a licensor grants the public permission to use the 40 | licensed material under specified terms and conditions. If 41 | the licensor's permission is not necessary for any reason--for 42 | example, because of any applicable exception or limitation to 43 | copyright--then that use is not regulated by the license. Our 44 | licenses grant only permissions under copyright and certain 45 | other rights that a licensor has authority to grant. Use of 46 | the licensed material may still be restricted for other 47 | reasons, including because others have copyright or other 48 | rights in the material. A licensor may make special requests, 49 | such as asking that all changes be marked or described. 50 | Although not required by our licenses, you are encouraged to 51 | respect those requests where reasonable. More considerations 52 | for the public: 53 | wiki.creativecommons.org/Considerations_for_licensees 54 | 55 | ======================================================================= 56 | 57 | Creative Commons Attribution 4.0 International Public License 58 | 59 | By exercising the Licensed Rights (defined below), You accept and agree 60 | to be bound by the terms and conditions of this Creative Commons 61 | Attribution 4.0 International Public License ("Public License"). To the 62 | extent this Public License may be interpreted as a contract, You are 63 | granted the Licensed Rights in consideration of Your acceptance of 64 | these terms and conditions, and the Licensor grants You such rights in 65 | consideration of benefits the Licensor receives from making the 66 | Licensed Material available under these terms and conditions. 67 | 68 | 69 | Section 1 -- Definitions. 70 | 71 | a. Adapted Material means material subject to Copyright and Similar 72 | Rights that is derived from or based upon the Licensed Material 73 | and in which the Licensed Material is translated, altered, 74 | arranged, transformed, or otherwise modified in a manner requiring 75 | permission under the Copyright and Similar Rights held by the 76 | Licensor. For purposes of this Public License, where the Licensed 77 | Material is a musical work, performance, or sound recording, 78 | Adapted Material is always produced where the Licensed Material is 79 | synched in timed relation with a moving image. 80 | 81 | b. Adapter's License means the license You apply to Your Copyright 82 | and Similar Rights in Your contributions to Adapted Material in 83 | accordance with the terms and conditions of this Public License. 84 | 85 | c. Copyright and Similar Rights means copyright and/or similar rights 86 | closely related to copyright including, without limitation, 87 | performance, broadcast, sound recording, and Sui Generis Database 88 | Rights, without regard to how the rights are labeled or 89 | categorized. For purposes of this Public License, the rights 90 | specified in Section 2(b)(1)-(2) are not Copyright and Similar 91 | Rights. 92 | 93 | d. Effective Technological Measures means those measures that, in the 94 | absence of proper authority, may not be circumvented under laws 95 | fulfilling obligations under Article 11 of the WIPO Copyright 96 | Treaty adopted on December 20, 1996, and/or similar international 97 | agreements. 98 | 99 | e. Exceptions and Limitations means fair use, fair dealing, and/or 100 | any other exception or limitation to Copyright and Similar Rights 101 | that applies to Your use of the Licensed Material. 102 | 103 | f. Licensed Material means the artistic or literary work, database, 104 | or other material to which the Licensor applied this Public 105 | License. 106 | 107 | g. Licensed Rights means the rights granted to You subject to the 108 | terms and conditions of this Public License, which are limited to 109 | all Copyright and Similar Rights that apply to Your use of the 110 | Licensed Material and that the Licensor has authority to license. 111 | 112 | h. Licensor means the individual(s) or entity(ies) granting rights 113 | under this Public License. 114 | 115 | i. Share means to provide material to the public by any means or 116 | process that requires permission under the Licensed Rights, such 117 | as reproduction, public display, public performance, distribution, 118 | dissemination, communication, or importation, and to make material 119 | available to the public including in ways that members of the 120 | public may access the material from a place and at a time 121 | individually chosen by them. 122 | 123 | j. Sui Generis Database Rights means rights other than copyright 124 | resulting from Directive 96/9/EC of the European Parliament and of 125 | the Council of 11 March 1996 on the legal protection of databases, 126 | as amended and/or succeeded, as well as other essentially 127 | equivalent rights anywhere in the world. 128 | 129 | k. You means the individual or entity exercising the Licensed Rights 130 | under this Public License. Your has a corresponding meaning. 131 | 132 | 133 | Section 2 -- Scope. 134 | 135 | a. License grant. 136 | 137 | 1. Subject to the terms and conditions of this Public License, 138 | the Licensor hereby grants You a worldwide, royalty-free, 139 | non-sublicensable, non-exclusive, irrevocable license to 140 | exercise the Licensed Rights in the Licensed Material to: 141 | 142 | a. reproduce and Share the Licensed Material, in whole or 143 | in part; and 144 | 145 | b. produce, reproduce, and Share Adapted Material. 146 | 147 | 2. Exceptions and Limitations. For the avoidance of doubt, where 148 | Exceptions and Limitations apply to Your use, this Public 149 | License does not apply, and You do not need to comply with 150 | its terms and conditions. 151 | 152 | 3. Term. The term of this Public License is specified in Section 153 | 6(a). 154 | 155 | 4. Media and formats; technical modifications allowed. The 156 | Licensor authorizes You to exercise the Licensed Rights in 157 | all media and formats whether now known or hereafter created, 158 | and to make technical modifications necessary to do so. The 159 | Licensor waives and/or agrees not to assert any right or 160 | authority to forbid You from making technical modifications 161 | necessary to exercise the Licensed Rights, including 162 | technical modifications necessary to circumvent Effective 163 | Technological Measures. For purposes of this Public License, 164 | simply making modifications authorized by this Section 2(a) 165 | (4) never produces Adapted Material. 166 | 167 | 5. Downstream recipients. 168 | 169 | a. Offer from the Licensor -- Licensed Material. Every 170 | recipient of the Licensed Material automatically 171 | receives an offer from the Licensor to exercise the 172 | Licensed Rights under the terms and conditions of this 173 | Public License. 174 | 175 | b. No downstream restrictions. You may not offer or impose 176 | any additional or different terms or conditions on, or 177 | apply any Effective Technological Measures to, the 178 | Licensed Material if doing so restricts exercise of the 179 | Licensed Rights by any recipient of the Licensed 180 | Material. 181 | 182 | 6. No endorsement. Nothing in this Public License constitutes or 183 | may be construed as permission to assert or imply that You 184 | are, or that Your use of the Licensed Material is, connected 185 | with, or sponsored, endorsed, or granted official status by, 186 | the Licensor or others designated to receive attribution as 187 | provided in Section 3(a)(1)(A)(i). 188 | 189 | b. Other rights. 190 | 191 | 1. Moral rights, such as the right of integrity, are not 192 | licensed under this Public License, nor are publicity, 193 | privacy, and/or other similar personality rights; however, to 194 | the extent possible, the Licensor waives and/or agrees not to 195 | assert any such rights held by the Licensor to the limited 196 | extent necessary to allow You to exercise the Licensed 197 | Rights, but not otherwise. 198 | 199 | 2. Patent and trademark rights are not licensed under this 200 | Public License. 201 | 202 | 3. To the extent possible, the Licensor waives any right to 203 | collect royalties from You for the exercise of the Licensed 204 | Rights, whether directly or through a collecting society 205 | under any voluntary or waivable statutory or compulsory 206 | licensing scheme. In all other cases the Licensor expressly 207 | reserves any right to collect such royalties. 208 | 209 | 210 | Section 3 -- License Conditions. 211 | 212 | Your exercise of the Licensed Rights is expressly made subject to the 213 | following conditions. 214 | 215 | a. Attribution. 216 | 217 | 1. If You Share the Licensed Material (including in modified 218 | form), You must: 219 | 220 | a. retain the following if it is supplied by the Licensor 221 | with the Licensed Material: 222 | 223 | i. identification of the creator(s) of the Licensed 224 | Material and any others designated to receive 225 | attribution, in any reasonable manner requested by 226 | the Licensor (including by pseudonym if 227 | designated); 228 | 229 | ii. a copyright notice; 230 | 231 | iii. a notice that refers to this Public License; 232 | 233 | iv. a notice that refers to the disclaimer of 234 | warranties; 235 | 236 | v. a URI or hyperlink to the Licensed Material to the 237 | extent reasonably practicable; 238 | 239 | b. indicate if You modified the Licensed Material and 240 | retain an indication of any previous modifications; and 241 | 242 | c. indicate the Licensed Material is licensed under this 243 | Public License, and include the text of, or the URI or 244 | hyperlink to, this Public License. 245 | 246 | 2. You may satisfy the conditions in Section 3(a)(1) in any 247 | reasonable manner based on the medium, means, and context in 248 | which You Share the Licensed Material. For example, it may be 249 | reasonable to satisfy the conditions by providing a URI or 250 | hyperlink to a resource that includes the required 251 | information. 252 | 253 | 3. If requested by the Licensor, You must remove any of the 254 | information required by Section 3(a)(1)(A) to the extent 255 | reasonably practicable. 256 | 257 | 4. If You Share Adapted Material You produce, the Adapter's 258 | License You apply must not prevent recipients of the Adapted 259 | Material from complying with this Public License. 260 | 261 | 262 | Section 4 -- Sui Generis Database Rights. 263 | 264 | Where the Licensed Rights include Sui Generis Database Rights that 265 | apply to Your use of the Licensed Material: 266 | 267 | a. for the avoidance of doubt, Section 2(a)(1) grants You the right 268 | to extract, reuse, reproduce, and Share all or a substantial 269 | portion of the contents of the database; 270 | 271 | b. if You include all or a substantial portion of the database 272 | contents in a database in which You have Sui Generis Database 273 | Rights, then the database in which You have Sui Generis Database 274 | Rights (but not its individual contents) is Adapted Material; and 275 | 276 | c. You must comply with the conditions in Section 3(a) if You Share 277 | all or a substantial portion of the contents of the database. 278 | 279 | For the avoidance of doubt, this Section 4 supplements and does not 280 | replace Your obligations under this Public License where the Licensed 281 | Rights include other Copyright and Similar Rights. 282 | 283 | 284 | Section 5 -- Disclaimer of Warranties and Limitation of Liability. 285 | 286 | a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE 287 | EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS 288 | AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF 289 | ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS, 290 | IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION, 291 | WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR 292 | PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS, 293 | ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT 294 | KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT 295 | ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU. 296 | 297 | b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE 298 | TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION, 299 | NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT, 300 | INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES, 301 | COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR 302 | USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN 303 | ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR 304 | DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR 305 | IN PART, THIS LIMITATION MAY NOT APPLY TO YOU. 306 | 307 | c. The disclaimer of warranties and limitation of liability provided 308 | above shall be interpreted in a manner that, to the extent 309 | possible, most closely approximates an absolute disclaimer and 310 | waiver of all liability. 311 | 312 | 313 | Section 6 -- Term and Termination. 314 | 315 | a. This Public License applies for the term of the Copyright and 316 | Similar Rights licensed here. However, if You fail to comply with 317 | this Public License, then Your rights under this Public License 318 | terminate automatically. 319 | 320 | b. Where Your right to use the Licensed Material has terminated under 321 | Section 6(a), it reinstates: 322 | 323 | 1. automatically as of the date the violation is cured, provided 324 | it is cured within 30 days of Your discovery of the 325 | violation; or 326 | 327 | 2. upon express reinstatement by the Licensor. 328 | 329 | For the avoidance of doubt, this Section 6(b) does not affect any 330 | right the Licensor may have to seek remedies for Your violations 331 | of this Public License. 332 | 333 | c. For the avoidance of doubt, the Licensor may also offer the 334 | Licensed Material under separate terms or conditions or stop 335 | distributing the Licensed Material at any time; however, doing so 336 | will not terminate this Public License. 337 | 338 | d. Sections 1, 5, 6, 7, and 8 survive termination of this Public 339 | License. 340 | 341 | 342 | Section 7 -- Other Terms and Conditions. 343 | 344 | a. The Licensor shall not be bound by any additional or different 345 | terms or conditions communicated by You unless expressly agreed. 346 | 347 | b. Any arrangements, understandings, or agreements regarding the 348 | Licensed Material not stated herein are separate from and 349 | independent of the terms and conditions of this Public License. 350 | 351 | 352 | Section 8 -- Interpretation. 353 | 354 | a. For the avoidance of doubt, this Public License does not, and 355 | shall not be interpreted to, reduce, limit, restrict, or impose 356 | conditions on any use of the Licensed Material that could lawfully 357 | be made without permission under this Public License. 358 | 359 | b. To the extent possible, if any provision of this Public License is 360 | deemed unenforceable, it shall be automatically reformed to the 361 | minimum extent necessary to make it enforceable. If the provision 362 | cannot be reformed, it shall be severed from this Public License 363 | without affecting the enforceability of the remaining terms and 364 | conditions. 365 | 366 | c. No term or condition of this Public License will be waived and no 367 | failure to comply consented to unless expressly agreed to by the 368 | Licensor. 369 | 370 | d. Nothing in this Public License constitutes or may be interpreted 371 | as a limitation upon, or waiver of, any privileges and immunities 372 | that apply to the Licensor or You, including from the legal 373 | processes of any jurisdiction or authority. 374 | 375 | 376 | ======================================================================= 377 | 378 | Creative Commons is not a party to its public 379 | licenses. Notwithstanding, Creative Commons may elect to apply one of 380 | its public licenses to material it publishes and in those instances 381 | will be considered the “Licensor.” The text of the Creative Commons 382 | public licenses is dedicated to the public domain under the CC0 Public 383 | Domain Dedication. Except for the limited purpose of indicating that 384 | material is shared under a Creative Commons public license or as 385 | otherwise permitted by the Creative Commons policies published at 386 | creativecommons.org/policies, Creative Commons does not authorize the 387 | use of the trademark "Creative Commons" or any other trademark or logo 388 | of Creative Commons without its prior written consent including, 389 | without limitation, in connection with any unauthorized modifications 390 | to any of its public licenses or any other arrangements, 391 | understandings, or agreements concerning use of licensed material. For 392 | the avoidance of doubt, this paragraph does not form part of the 393 | public licenses. 394 | 395 | Creative Commons may be contacted at creativecommons.org. 396 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Welcome to the Use .gitignore exercise! 2 | 3 | This exercise checks your knowledge on using a `.gitignore` file. It is automatically graded via a workflow once you have completed the instructions. 4 | 5 | ## About this exercise 6 | 7 | :warning: A grading script exists under `.github/workflows/grading.yml`. You do not need to use this workflow for any purpose and **altering its contents will affect the repository's ability to assess your exercise and give feedback.** 8 | 9 | :warning: This exercise utilizes [GitHub Actions](https://docs.github.com/en/actions), which is free for public repositories and self-hosted runners, but may incur charges on private repositories. See _[About billing for GitHub Actions]_ to learn more. 10 | 11 | :information_source: The use of GitHub Actions also means that it may take the grading workflow a few seconds and sometimes minutes to run. 12 | 13 | ## Instructions 14 | 15 | 16 | 17 | Please complete the instructions below: 18 | 19 | 1. Create your own copy of this repository by using the [Use this template](https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/creating-a-repository-from-a-template#creating-a-repository-from-a-template) button. 20 | 2. Edit the `.gitignore` file at the root of the repository so that it meets the following conditions: 21 | - Ignores all files starting with the letter `z`. 22 | - Ignores a file called `.env`. 23 | - Ignores a top-level directory named `artifacts`. 24 | 25 | 26 | 27 | ## Seeing your result 28 | 29 | Your exercise is graded automatically once you have completed the instructions. To see the result of your exercise, go to the **Actions** tab, and see the most recent run on the **Grading** workflow. 30 | 31 | Below is an example of an incorrect solution and the feedback provided in the **Grading results:** 32 | 33 | ![Screen Shot 2021-06-10 at 12 44 21 PM](https://user-images.githubusercontent.com/6351798/121580870-7822aa00-c9ea-11eb-855e-f839852566c6.png) 34 | 35 | 36 | See _[Viewing workflow run history]_ if you need assistance. 37 | 38 | ## Troubleshooting 39 | 40 | If you are stuck with a step in the exercise or the grading workflow does not automatically run after you complete the instructions, run the troubleshooter: in the **Actions** tab select the **Grading workflow**, click **Run workflow**, select the appropriate branch, and click the **Run workflow** button. 41 | 42 | ![Screen Shot 2021-06-10 at 12 59 28 PM](https://user-images.githubusercontent.com/6351798/121582006-bd93a700-c9eb-11eb-9576-9ec644b8f701.png) 43 | 44 | The troubleshooter will either display useful information to help you understand what you might have done wrong in your exercise or redirect you to the documentation relevant to your exercise to help you out. 45 | 46 | See _[Running a workflow on GitHub]_ if you need assistance. 47 | 48 | ## Useful resources 49 | 50 | Use these to help you! 51 | 52 | Resources specific to this exercise: 53 | 54 | - [Pattern format for .gitignore - git Docs] 55 | 56 | 57 | 58 | Resources for working with exercises and GitHub Actions in general: 59 | 60 | - [Creating a repository from a template] 61 | - [Viewing workflow run history] 62 | - [Running a workflow on GitHub] 63 | - [About billing for GitHub Actions] 64 | - [GitHub Actions] 65 | 66 | 69 | 70 | 71 | [creating a repository from a template]: https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/creating-a-repository-from-a-template 72 | [viewing workflow run history]: https://docs.github.com/en/actions/managing-workflow-runs/viewing-workflow-run-history 73 | [running a workflow on github]: https://docs.github.com/en/actions/managing-workflow-runs/manually-running-a-workflow#running-a-workflow-on-github 74 | [about billing for github actions]: https://docs.github.com/en/github/setting-up-and-managing-billing-and-payments-on-github/about-billing-for-github-actions 75 | [github actions]: https://docs.github.com/en/actions 76 | [pattern format for .gitignore - git docs]: https://git-scm.com/docs/gitignore#_pattern_format 77 | --------------------------------------------------------------------------------