logo

Academy

DocumentationTemplates

Commit template: code and hack

The commit message template for a programming solution and for a ctf-hacking solution, field by field.

This is the commit template for a code challenge and for a hack challenge.

Fill the fields in angle brackets <>. The list below tells you what each field is. Do not put these comments in the final commit message.

  • <product> is chall.

  • <scope> is code for a programming challenge, or hack for a ctf-hacking challenge.

  • <site-name> and <chall-code> must obey the naming conventions of the repository. Each one accepts only lowercase letters, digits and hyphens.

    The part after #0 must have this exact shape:

    <site-name>, <chall-code> (<complexity>)

    A comma and one space separate the two names, and one space precedes the parenthesis. codeabbey, 78 (5) is correct. codeabbey,78 (5), codeabbey, 78(5) and code_abbey, 78 (5) are not.

  • <complexity> is the difficulty of the challenge, or its score, from the platform of the challenge. The meaning is different on each platform, and the YAML reference gives the full definition. This is a short summary:

    • codeabbey. The blessing of the problem, which is the name CodeAbbey gives to its difficulty. It is equal to score.progress. Write it as a decimal, such as 9.33.
    • spoj. The score of the problem, which SPOJ shows to you at the moment of the solution. The formula is 80 / (40 + N), and the value is dynamic. The usual range is from 0.007 to 2.0. Write the value that SPOJ shows to you, as a decimal, such as 0.183.
    • hacking sites. The points that the site gives for the challenge, such as 3, 15, 147 or 5.56. The CI does not accept a label such as easy or medium. The policy job changes the value to a float. A value that is not a number stops the job with an error. If the site shows only a label, write the points that the platform gives for it.

These are examples of the commit title:

  • Programming: chall\sol(code): #0 codeabbey, 12 (9.8).
  • Programming: chall\sol(code): #0 spoj, 1 (0.183).
  • Hacking: chall\sol(hack): #0 2017game-picoctf, challenge-5 (20).

Template:

<product>\sol(<scope>): #0 <site-name>, <chall-code> (<complexity>)

- <relevant-info>

The body gives the relevant information about your solution. The body must exist, and it must have 15 characters or more. Commit gives the rules of the body.

Full hacking example:

chall\sol(hack): #0 cryptohack, ascii (6)

- python solution with a frequency analysis

Full programming examples:

chall\sol(code): #0 codeabbey, 50 (5.22)

- dart solution
chall\sol(code): #0 spoj, 1 (0.183)

- elixir solution

Make one commit for each solution. That commit must also contain the new links to external solutions. External solutions gives their quantity and their rules.

Before you push your branch, examine the commits behind master and the commits ahead of it. Then make one merge request, with that one commit, for one challenge. Send the merge request only after the pipeline passes. Read Submission overview.